fix(frontend): Fix aggrid infinite refresh (#3789)

* fix(frontend): Fix AgGrid infinit refresh when args changed

* fix(frontend): Fix AgGrid infinit refresh when args changed

* fix(frontend): remove dead code
This commit is contained in:
Faton Ramadani
2024-05-22 16:57:45 +02:00
committed by GitHub
parent 2f370de628
commit 85cd8b4c0e
3 changed files with 6 additions and 6 deletions
@@ -31,17 +31,11 @@
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>('AppViewerContext')
const { app, worldStore } = context
@@ -182,6 +176,9 @@
{render}
autoRefresh={true}
allowConcurentRequests
on:argsChanged={() => {
clear()
}}
>
<div class="flex flex-col h-full">
{#if resolvedConfig.searchEnabled}
@@ -137,6 +137,8 @@
resultJobLoader &&
refreshIfAutoRefresh('arg changed')
$: runnableInputValues && dispatch('argsChanged')
$: refreshOn =
runnable && runnable.type === 'runnableByName' ? runnable.inlineScript?.refreshOn ?? [] : []
@@ -275,6 +275,7 @@
on:done
on:doneError
on:cancel
on:argsChanged
on:resultSet={() => (initializing = false)}
on:success={(e) => {
onSuccess(e.detail)