From 035366ab7020dd77bfe2b5b66ea253e743526ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Thu, 9 Oct 2025 16:17:54 +0300 Subject: [PATCH] =?UTF-8?q?format=20ve=20mask=20d=C3=BCzeltmesi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/PlatformListFormsSeeder.cs | 2 +- ui/src/shared/useListFormColumns.ts | 28 +------------------ ui/src/views/list/Grid.tsx | 1 + 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformListFormsSeeder.cs index 6905e059..18d97836 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformListFormsSeeder.cs @@ -12092,7 +12092,7 @@ public class PlatformListFormsSeeder : IDataSeedContributor, ITransientDependenc { Title = "About Form", Width = 800, - Height = 600 + Height = 720 }, AllowDeleting = true, AllowAdding = true, diff --git a/ui/src/shared/useListFormColumns.ts b/ui/src/shared/useListFormColumns.ts index c73f44d8..589c07d9 100644 --- a/ui/src/shared/useListFormColumns.ts +++ b/ui/src/shared/useListFormColumns.ts @@ -375,33 +375,7 @@ const useListFormColumns = ({ column.alignment = colData.alignment column.format = colData.format - - // 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 - } - } - } + column.editorOptions = { ...(colData.editorOptions as IFormatProps) } // columnCustomizationDto column.fixed = colData.columnCustomizationDto?.fixed diff --git a/ui/src/views/list/Grid.tsx b/ui/src/views/list/Grid.tsx index 5d302e8f..9fe4c7d4 100644 --- a/ui/src/views/list/Grid.tsx +++ b/ui/src/views/list/Grid.tsx @@ -676,6 +676,7 @@ const Grid = (props: GridProps) => { rtlEnabled={gridDto.gridOptions.columnOptionDto?.rtlEnabled} rowAlternationEnabled={gridDto.gridOptions.columnOptionDto?.rowAlternationEnabled} onRowPrepared={(e) => { + //header, filter, data, group, summaries if (e.rowType === 'data') { e.rowElement.style.height = gridDto.gridOptions?.rowDto.rowHeight e.rowElement.style.whiteSpace = gridDto.gridOptions?.rowDto.whiteSpace