diff --git a/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte b/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte index 58e7b02bdd..9f97eb6dc2 100644 --- a/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte +++ b/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte @@ -284,6 +284,7 @@ : undefined, onPaginationChanged: (event) => { outputs?.page.set(event.api.paginationGetCurrentPage()) + footerRenderCount++ }, initialState: state, suppressRowDeselection: true, @@ -422,6 +423,7 @@ } let loading = false let refreshCount: number = 0 + let footerRenderCount: number = 0 {#each Object.keys(components['aggridcomponent'].initialData.configuration) as key (key)} @@ -488,88 +490,91 @@ {/key} {#if resolvedConfig.footer} -
-
- - Download -
-
- {#if resolvedConfig?.pagination} - {#key refreshCount} -
- {(api?.paginationGetPageSize() ?? 0) * (api?.paginationGetCurrentPage() ?? 0) + 1} - to {Math.min( - api?.paginationGetRowCount() ?? 0, - ((api?.paginationGetCurrentPage() ?? 0) + 1) * - (api?.paginationGetPageSize() ?? 0) - )} - of {api?.paginationGetRowCount()} -
+ {#key footerRenderCount} +
+
+ + Download +
+
+ {#if resolvedConfig?.pagination} + {#key refreshCount} +
+ {(api?.paginationGetPageSize() ?? 0) * (api?.paginationGetCurrentPage() ?? 0) + + 1} + to {Math.min( + api?.paginationGetRowCount() ?? 0, + ((api?.paginationGetCurrentPage() ?? 0) + 1) * + (api?.paginationGetPageSize() ?? 0) + )} + of {api?.paginationGetRowCount()} +
-
-
+ {/key} {/if}
diff --git a/frontend/src/lib/components/apps/components/inputs/AppFileInput.svelte b/frontend/src/lib/components/apps/components/inputs/AppFileInput.svelte index 5f385b8c44..da42594e1d 100644 --- a/frontend/src/lib/components/apps/components/inputs/AppFileInput.svelte +++ b/frontend/src/lib/components/apps/components/inputs/AppFileInput.svelte @@ -14,7 +14,8 @@ export let customCss: ComponentCustomCSS<'fileinputcomponent'> | undefined = undefined export let render: boolean - const { app, worldStore, componentControl } = getContext('AppViewerContext') + const { app, worldStore, componentControl, mode } = + getContext('AppViewerContext') let acceptedFileTypes: string[] | undefined = undefined let allowMultiple: boolean | undefined = undefined @@ -48,6 +49,16 @@ } let files: File[] | undefined = undefined + + function preFillFiles() { + const data = outputs?.result?.peak() + + if (data && Array.isArray(data) && data.length > 0) { + files = data.map((file: { name: any }) => new File([], file?.name)) + } + } + + $: outputs.result && files === undefined && $mode === 'dnd' && preFillFiles() {#each Object.keys(css ?? {}) as key (key)}