diff --git a/frontend/src/lib/components/apps/components/display/table/AppAggridInfiniteTable.svelte b/frontend/src/lib/components/apps/components/display/table/AppAggridInfiniteTable.svelte index 3962e00fcc..76051de92e 100644 --- a/frontend/src/lib/components/apps/components/display/table/AppAggridInfiniteTable.svelte +++ b/frontend/src/lib/components/apps/components/display/table/AppAggridInfiniteTable.svelte @@ -29,6 +29,18 @@ export let actions: TableAction[] | undefined = undefined let runnableComponent: RunnableComponent | undefined = undefined + function clear() { + lastComponentInput = componentInput + + setTimeout(() => { + aggrid?.clearRows() + }, 0) + } + + let lastComponentInput = componentInput + + $: JSON.stringify(lastComponentInput) !== JSON.stringify(componentInput) && clear() + const context = getContext('AppViewerContext') const { app, worldStore } = context @@ -62,14 +74,6 @@ let aggrid: AppAggridExplorerTable | undefined = undefined - function clear() { - if (componentInput?.type !== 'runnable') { - aggrid?.clearRows() - } - } - - $: result && clear() - const datasource: IDatasource = { rowCount: undefined,