Grid ve Tree için Heigth EditorOptions
This commit is contained in:
parent
9988cd11b0
commit
2044abdca2
3 changed files with 30 additions and 8 deletions
|
|
@ -726,6 +726,18 @@ const Grid = (props: GridProps) => {
|
|||
const formItem = columnFormat?.editOrderNo != null ? columnFormat : undefined
|
||||
const isNewRow = Boolean((editor as any).row?.isNewRow) || mode === 'new'
|
||||
|
||||
if (columnFormat?.editorOptions) {
|
||||
try {
|
||||
const configuredEditorOptions = JSON.parse(columnFormat.editorOptions)
|
||||
editor.editorOptions = {
|
||||
...editor.editorOptions,
|
||||
...configuredEditorOptions,
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('EditorOptions parse error:', columnFormat.fieldName, err)
|
||||
}
|
||||
}
|
||||
|
||||
const hasReadOnlyEditorOption = editor.editorOptions?.readOnly === true
|
||||
const hasDisabledEditorOption = editor.editorOptions?.disabled === true
|
||||
|
||||
|
|
|
|||
|
|
@ -665,6 +665,18 @@ const Tree = (props: TreeProps) => {
|
|||
const formItem = columnFormat?.editOrderNo != null ? columnFormat : undefined
|
||||
const isNewRow = Boolean((editor as any).row?.isNewRow) || mode === 'new'
|
||||
|
||||
if (columnFormat?.editorOptions) {
|
||||
try {
|
||||
const configuredEditorOptions = JSON.parse(columnFormat.editorOptions)
|
||||
editor.editorOptions = {
|
||||
...editor.editorOptions,
|
||||
...configuredEditorOptions,
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('EditorOptions parse error:', columnFormat.fieldName, err)
|
||||
}
|
||||
}
|
||||
|
||||
const hasReadOnlyEditorOption = editor.editorOptions?.readOnly === true
|
||||
const hasDisabledEditorOption = editor.editorOptions?.disabled === true
|
||||
|
||||
|
|
|
|||
|
|
@ -862,17 +862,15 @@ const useListFormColumns = ({
|
|||
}
|
||||
}
|
||||
|
||||
column.editorOptions = { ...editorOptions }
|
||||
|
||||
// Format bilgisini öncelik sırasına göre ata
|
||||
if (column.editorOptions.displayFormat) {
|
||||
column.format = column.editorOptions.displayFormat
|
||||
} else if (column.editorOptions.format) {
|
||||
column.format = column.editorOptions.format
|
||||
if (editorOptions.displayFormat) {
|
||||
column.format = editorOptions.displayFormat
|
||||
} else if (editorOptions.format) {
|
||||
column.format = editorOptions.format
|
||||
}
|
||||
|
||||
if (typeof column.editorOptions.encodeHtml === 'boolean') {
|
||||
column.encodeHtml = column.editorOptions.encodeHtml
|
||||
if (typeof editorOptions.encodeHtml === 'boolean') {
|
||||
column.encodeHtml = editorOptions.encodeHtml
|
||||
}
|
||||
|
||||
// columnCustomizationDto
|
||||
|
|
|
|||
Loading…
Reference in a new issue