onInitNewRow düzenlemesi
This commit is contained in:
parent
e295c6819a
commit
4fd5d8edd2
2 changed files with 47 additions and 57 deletions
|
|
@ -302,15 +302,10 @@ const Grid = (props: GridProps) => {
|
|||
if (rawFilter) {
|
||||
const parsed = JSON.parse(rawFilter)
|
||||
const filters = extractSearchParamsFields(parsed)
|
||||
|
||||
const hasFilter = filters.some(([field, op, val]) => field === colFormat.fieldName)
|
||||
|
||||
if (hasFilter) {
|
||||
const fieldMatch = filters.find(([field, op, val]) => field === colFormat.fieldName)
|
||||
const fieldMatch = filters.find(([field]) => field === colFormat.fieldName)
|
||||
|
||||
if (fieldMatch) {
|
||||
const [, , val] = fieldMatch
|
||||
|
||||
const val = fieldMatch[2] //value
|
||||
const dType = colFormat.dataType as DataType
|
||||
|
||||
switch (dType) {
|
||||
|
|
@ -337,7 +332,6 @@ const Grid = (props: GridProps) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onRowInserting(e: DataGridTypes.RowInsertingEvent<any, any>) {
|
||||
e.data = setFormEditingExtraItemValues(e.data)
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ import { getList } from '@/services/form.service'
|
|||
import { layoutTypes } from '../admin/listForm/edit/types'
|
||||
import { useListFormCustomDataSource } from './useListFormCustomDataSource'
|
||||
import { useListFormColumns } from './useListFormColumns'
|
||||
import { DataType } from 'devextreme/common'
|
||||
|
||||
interface TreeProps {
|
||||
listFormCode: string
|
||||
|
|
@ -313,15 +314,11 @@ const Tree = (props: TreeProps) => {
|
|||
if (rawFilter) {
|
||||
const parsed = JSON.parse(rawFilter)
|
||||
const filters = extractSearchParamsFields(parsed)
|
||||
|
||||
const hasFilter = filters.some(([field, op, val]) => field === colFormat.fieldName)
|
||||
|
||||
if (hasFilter) {
|
||||
const fieldMatch = filters.find(([field, op, val]) => field === colFormat.fieldName)
|
||||
const fieldMatch = filters.find(([field]) => field === colFormat.fieldName)
|
||||
|
||||
if (fieldMatch) {
|
||||
const [, , val] = fieldMatch
|
||||
const dType = colFormat.dataType as any
|
||||
const val = fieldMatch[2] //value
|
||||
const dType = colFormat.dataType as DataType
|
||||
|
||||
switch (dType) {
|
||||
case 'date':
|
||||
|
|
@ -347,7 +344,6 @@ const Tree = (props: TreeProps) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onRowInserting(e: TreeListTypes.RowInsertingEvent) {
|
||||
e.data = setFormEditingExtraItemValues(e.data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue