mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 00:04:10 +00:00
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:
+3
-6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user