format ve mask düzeltmesi
This commit is contained in:
parent
bd0a382c7c
commit
035366ab70
3 changed files with 3 additions and 28 deletions
|
|
@ -12092,7 +12092,7 @@ public class PlatformListFormsSeeder : IDataSeedContributor, ITransientDependenc
|
||||||
{
|
{
|
||||||
Title = "About Form",
|
Title = "About Form",
|
||||||
Width = 800,
|
Width = 800,
|
||||||
Height = 600
|
Height = 720
|
||||||
},
|
},
|
||||||
AllowDeleting = true,
|
AllowDeleting = true,
|
||||||
AllowAdding = true,
|
AllowAdding = true,
|
||||||
|
|
|
||||||
|
|
@ -375,33 +375,7 @@ const useListFormColumns = ({
|
||||||
|
|
||||||
column.alignment = colData.alignment
|
column.alignment = colData.alignment
|
||||||
column.format = colData.format
|
column.format = colData.format
|
||||||
|
column.editorOptions = { ...(colData.editorOptions as IFormatProps) }
|
||||||
// editorOptions
|
|
||||||
if (!colData.editorOptions) {
|
|
||||||
const allFormItems = gridDto.gridOptions.editingFormDto.flatMap((g) => g.items)
|
|
||||||
const formItem = allFormItems.find((f) => f?.dataField === colData.fieldName)
|
|
||||||
if (formItem?.editorOptions) {
|
|
||||||
colData.editorOptions = formItem.editorOptions
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (colData.editorOptions) {
|
|
||||||
try {
|
|
||||||
column.editorOptions =
|
|
||||||
typeof colData.editorOptions === 'string'
|
|
||||||
? JSON.parse(colData.editorOptions)
|
|
||||||
: colData.editorOptions
|
|
||||||
} catch (err) {
|
|
||||||
// Eğer JSON değilse, eval fallback
|
|
||||||
try {
|
|
||||||
// Örneğin { format: 'phoneGlobal', mask: '+90 (000)...' } gibi string geldiğinde
|
|
||||||
column.editorOptions = eval('(' + colData.editorOptions + ')')
|
|
||||||
} catch (e2) {
|
|
||||||
console.warn('Invalid editorOptions for', colData.fieldName, colData.editorOptions)
|
|
||||||
column.editorOptions = undefined
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// columnCustomizationDto
|
// columnCustomizationDto
|
||||||
column.fixed = colData.columnCustomizationDto?.fixed
|
column.fixed = colData.columnCustomizationDto?.fixed
|
||||||
|
|
|
||||||
|
|
@ -676,6 +676,7 @@ const Grid = (props: GridProps) => {
|
||||||
rtlEnabled={gridDto.gridOptions.columnOptionDto?.rtlEnabled}
|
rtlEnabled={gridDto.gridOptions.columnOptionDto?.rtlEnabled}
|
||||||
rowAlternationEnabled={gridDto.gridOptions.columnOptionDto?.rowAlternationEnabled}
|
rowAlternationEnabled={gridDto.gridOptions.columnOptionDto?.rowAlternationEnabled}
|
||||||
onRowPrepared={(e) => {
|
onRowPrepared={(e) => {
|
||||||
|
//header, filter, data, group, summaries
|
||||||
if (e.rowType === 'data') {
|
if (e.rowType === 'data') {
|
||||||
e.rowElement.style.height = gridDto.gridOptions?.rowDto.rowHeight
|
e.rowElement.style.height = gridDto.gridOptions?.rowDto.rowHeight
|
||||||
e.rowElement.style.whiteSpace = gridDto.gridOptions?.rowDto.whiteSpace
|
e.rowElement.style.whiteSpace = gridDto.gridOptions?.rowDto.whiteSpace
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue