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 formItem = columnFormat?.editOrderNo != null ? columnFormat : undefined
|
||||||
const isNewRow = Boolean((editor as any).row?.isNewRow) || mode === 'new'
|
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 hasReadOnlyEditorOption = editor.editorOptions?.readOnly === true
|
||||||
const hasDisabledEditorOption = editor.editorOptions?.disabled === true
|
const hasDisabledEditorOption = editor.editorOptions?.disabled === true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -665,6 +665,18 @@ const Tree = (props: TreeProps) => {
|
||||||
const formItem = columnFormat?.editOrderNo != null ? columnFormat : undefined
|
const formItem = columnFormat?.editOrderNo != null ? columnFormat : undefined
|
||||||
const isNewRow = Boolean((editor as any).row?.isNewRow) || mode === 'new'
|
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 hasReadOnlyEditorOption = editor.editorOptions?.readOnly === true
|
||||||
const hasDisabledEditorOption = editor.editorOptions?.disabled === 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
|
// Format bilgisini öncelik sırasına göre ata
|
||||||
if (column.editorOptions.displayFormat) {
|
if (editorOptions.displayFormat) {
|
||||||
column.format = column.editorOptions.displayFormat
|
column.format = editorOptions.displayFormat
|
||||||
} else if (column.editorOptions.format) {
|
} else if (editorOptions.format) {
|
||||||
column.format = column.editorOptions.format
|
column.format = editorOptions.format
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof column.editorOptions.encodeHtml === 'boolean') {
|
if (typeof editorOptions.encodeHtml === 'boolean') {
|
||||||
column.encodeHtml = column.editorOptions.encodeHtml
|
column.encodeHtml = editorOptions.encodeHtml
|
||||||
}
|
}
|
||||||
|
|
||||||
// columnCustomizationDto
|
// columnCustomizationDto
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue