Skip to content

Commit

Permalink
fix: improve infinite grid behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Feb 25, 2025
1 parent d0ee16b commit 56d1da7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@
},
onGridReady: (e) => {
outputs?.ready.set(true)
$componentControl[id] = {
agGrid: { api: e.api, columnApi: e.columnApi },
setSelectedIndex: (index) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -180,6 +181,10 @@
bind:result
bind:loading
bind:runnableComponent
on:recompute={() => {
console.log('recompute')
clear()
}}
{render}
autoRefresh={true}
allowConcurentRequests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
on:done
on:doneError
on:cancel
on:recompute
on:argsChanged
on:resultSet={() => (initializing = false)}
on:success={(e) => {
Expand Down

0 comments on commit 56d1da7

Please sign in to comment.