From ed3ac2d9288ced5ebf5efeb3f6b91298ba728e25 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 21 Oct 2025 14:11:55 +0000 Subject: [PATCH] fix: fix column def sync for evalv2 --- .../display/table/SyncColumnDefs.svelte | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/frontend/src/lib/components/apps/components/display/table/SyncColumnDefs.svelte b/frontend/src/lib/components/apps/components/display/table/SyncColumnDefs.svelte index 9e45c0f770..d5443de03d 100644 --- a/frontend/src/lib/components/apps/components/display/table/SyncColumnDefs.svelte +++ b/frontend/src/lib/components/apps/components/display/table/SyncColumnDefs.svelte @@ -71,20 +71,10 @@ // Type guard for configuration structure const conf = rawConf as ColumnDefsConfiguration - if (!conf.type || (conf.type !== 'static' && conf.type !== 'evalv2')) return + if (!conf.type || conf.type !== 'static') return let currentColumns: WindmillColumnDef[] | undefined - if (conf.type === 'static') { - currentColumns = Array.isArray(conf.value) ? conf.value : [] - } else if (conf.type === 'evalv2') { - try { - const parsed = JSON.parse(conf.expr ?? '[]') - currentColumns = Array.isArray(parsed) ? parsed : [] - } catch (e) { - console.warn('Failed to parse columnDefs expression:', e) - currentColumns = [] - } - } + currentColumns = Array.isArray(conf.value) ? conf.value : [] const hasPlaceholder = hasActionsPlaceholder(currentColumns) @@ -99,11 +89,7 @@ if (needsRemove) nextColumns = removeActionsPlaceholder(nextColumns) // Update configuration with proper typing - if (conf.type === 'static') { - conf.value = nextColumns - } else if (conf.type === 'evalv2') { - conf.expr = JSON.stringify(nextColumns) - } + conf.value = nextColumns await updateConfiguration() }