diff --git a/frontend/src/lib/components/apps/components/display/table/AppAggridExplorerTable.svelte b/frontend/src/lib/components/apps/components/display/table/AppAggridExplorerTable.svelte index 38a7af9759..e9e5c9599e 100644 --- a/frontend/src/lib/components/apps/components/display/table/AppAggridExplorerTable.svelte +++ b/frontend/src/lib/components/apps/components/display/table/AppAggridExplorerTable.svelte @@ -109,8 +109,7 @@ function refreshActions(actions: TableAction[]) { if (!deepEqual(actions, lastActions)) { - lastActions = [...actions] - + lastActions = structuredClone(actions) updateOptions() } } diff --git a/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte b/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte index a3e7b9b007..cfe10b8991 100644 --- a/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte +++ b/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte @@ -202,12 +202,8 @@ function refreshActions(actions: TableAction[]) { if (!deepEqual(actions, lastActions)) { - // structuredClone did not work because it did not copy the array's - // prototype, causing deepEqual to return false although the objects were - // semantically the same - lastActions = [...actions] - // HACK: without setTimeout, the actions mount but aren't visible - setTimeout(updateOptions, 0.5) + lastActions = structuredClone(actions) + updateOptions() } } @@ -459,7 +455,6 @@ } } - let lastComputedColumnDefs: [Record[] | undefined, TableAction[] | undefined] function updateOptions() { try { const columnDefs = @@ -481,10 +476,6 @@ }) } - // Don't update if the columns - if (deepEqual(lastComputedColumnDefs, [columnDefs, actions])) return - lastComputedColumnDefs = [columnDefs, actions] - api?.updateGridOptions({ rowData: value, columnDefs: columnDefs.map((fields) => { diff --git a/frontend/src/lib/components/apps/components/display/table/AppAggridTableActions.svelte b/frontend/src/lib/components/apps/components/display/table/AppAggridTableActions.svelte index 129e534ce2..732569cb69 100644 --- a/frontend/src/lib/components/apps/components/display/table/AppAggridTableActions.svelte +++ b/frontend/src/lib/components/apps/components/display/table/AppAggridTableActions.svelte @@ -1,5 +1,5 @@ {#each actions as action, actionIndex}