fix: improve infinite grid behavior

This commit is contained in:
Ruben Fiszel
2025-02-25 19:51:41 +01:00
parent d0ee16b1b9
commit 56d1da78fd
4 changed files with 8 additions and 2 deletions
@@ -344,7 +344,6 @@
},
onGridReady: (e) => {
outputs?.ready.set(true)
$componentControl[id] = {
agGrid: { api: e.api, columnApi: e.columnApi },
setSelectedIndex: (index) => {
@@ -20,6 +20,7 @@
import InitializeComponent from '../../helpers/InitializeComponent.svelte'
import DebouncedInput from '../../helpers/DebouncedInput.svelte'
import RunnableComponent from '../../helpers/RunnableComponent.svelte'
import { sendUserToast } from '$lib/toast'
export let id: string
export let componentInput: AppInput | undefined
@@ -38,7 +39,7 @@
}
const context = getContext<AppViewerContext>('AppViewerContext')
const { app, worldStore } = context
const { app, worldStore, componentControl } = context
let css = initCss($app.css?.aggridcomponent, customCss)
let result: any[] | undefined = undefined
@@ -180,6 +181,10 @@
bind:result
bind:loading
bind:runnableComponent
on:recompute={() => {
console.log('recompute')
clear()
}}
{render}
autoRefresh={true}
allowConcurentRequests
@@ -600,6 +600,7 @@
cancellableRun = (inlineScript?: InlineScript, setRunnableJobEditorPanel?: boolean) => {
let rejectCb: (err: Error) => void
let p: Partial<CancelablePromise<any>> = new Promise<any>((resolve, reject) => {
dispatch('recompute')
rejectCb = reject
executeComponent(true, inlineScript, setRunnableJobEditorPanel, undefined, {
done: (x) => {
@@ -279,6 +279,7 @@
on:done
on:doneError
on:cancel
on:recompute
on:argsChanged
on:resultSet={() => (initializing = false)}
on:success={(e) => {