fix(frontend): Fix AgGrid infinit clear (#3607)
This commit is contained in:
@@ -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>('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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user