diff --git a/frontend/src/lib/components/apps/components/display/PlotlyHtml.svelte b/frontend/src/lib/components/apps/components/display/PlotlyHtml.svelte index e198752aa3..e6f9ae5d89 100644 --- a/frontend/src/lib/components/apps/components/display/PlotlyHtml.svelte +++ b/frontend/src/lib/components/apps/components/display/PlotlyHtml.svelte @@ -33,7 +33,7 @@ let Plotly onMount(async () => { //@ts-ignore - await import('https://cdn.plot.ly/plotly-2.18.0.min.js') + await import('https://cdn.jsdelivr.net/npm/plotly.js-dist@2.18.0/plotly.min.js') Plotly = window['Plotly'] }) 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 8d8168647b..83db401873 100644 --- a/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte +++ b/frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte @@ -4,7 +4,7 @@ import AgGridSvelte from 'ag-grid-svelte/AgGridSvelte.svelte' import { isObject } from '$lib/utils' - import { getContext, tick } from 'svelte' + import { getContext } from 'svelte' import type { AppInput } from '../../../inputType' import type { AppViewerContext, RichConfigurations } from '../../../types' import RunnableWrapper from '../../helpers/RunnableWrapper.svelte' diff --git a/frontend/src/lib/components/apps/components/helpers/InputValue.svelte b/frontend/src/lib/components/apps/components/helpers/InputValue.svelte index 23d44c3ced..2f4945b892 100644 --- a/frontend/src/lib/components/apps/components/helpers/InputValue.svelte +++ b/frontend/src/lib/components/apps/components/helpers/InputValue.svelte @@ -116,6 +116,8 @@ } async function evalExpr(input: EvalAppInput): Promise { + if (iterContext && $iterContext.disabled) return + try { const r = await eval_like( input.expr, @@ -136,6 +138,8 @@ } async function getValue(input: AppInput) { + if (iterContext && $iterContext.disabled) return + if (!input) return if (input.type === 'template' && isCodeInjection(input.eval)) { try { @@ -162,6 +166,8 @@ } function onValueChange(newValue: any): void { + if (iterContext && $iterContext.disabled) return + if (lastInput?.type === 'connected' && newValue !== undefined && newValue !== null) { const { connection } = lastInput if (!connection) { diff --git a/frontend/src/lib/components/apps/components/helpers/RunnableComponent.svelte b/frontend/src/lib/components/apps/components/helpers/RunnableComponent.svelte index a7024a529a..a7e27a57ea 100644 --- a/frontend/src/lib/components/apps/components/helpers/RunnableComponent.svelte +++ b/frontend/src/lib/components/apps/components/helpers/RunnableComponent.svelte @@ -161,6 +161,10 @@ async function executeComponent(noToast = false, inlineScriptOverride?: InlineScript) { console.debug(`Executing ${id}`) + if (iterContext && $iterContext.disabled) { + console.debug(`Skipping execution of ${id} because it is part of a disabled list`) + return + } if (runnable?.type === 'runnableByName' && runnable.inlineScript?.language === 'frontend') { loading = true try { diff --git a/frontend/src/lib/components/apps/components/layout/AppList.svelte b/frontend/src/lib/components/apps/components/layout/AppList.svelte index c38414c90f..cd06d1e8d0 100644 --- a/frontend/src/lib/components/apps/components/layout/AppList.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppList.svelte @@ -55,58 +55,63 @@ - -
- {#if $app.subgrids?.[`${id}-0`]} - {#if Array.isArray(result)} - {#each result ?? [] as value, index} -
- - { - if (!$connectingInput.opened) { - $selectedComponent = [id] - } - onFocus() - }} - /> - -
- {/each} - {:else} - - { - if (!$connectingInput.opened) { - $selectedComponent = [id] - } - onFocus() - }} - /> - -
Input data is not an array
+ + +
+ {#if $app.subgrids?.[`${id}-0`]} + {#if Array.isArray(result) && result.length > 0} + {#each result ?? [] as value, index} +
+ + { + if (!$connectingInput.opened) { + $selectedComponent = [id] + } + onFocus() + }} + /> + +
+ {/each} + {:else} + + + + {#if !Array.isArray(result)} +
Input data is not an array
+ {/if} + {/if} {/if} - {/if} -
- +
+
+{:else} + + + +{/if} diff --git a/frontend/src/lib/components/apps/components/layout/ListWrapper.svelte b/frontend/src/lib/components/apps/components/layout/ListWrapper.svelte index cebd328a04..2e15270b13 100644 --- a/frontend/src/lib/components/apps/components/layout/ListWrapper.svelte +++ b/frontend/src/lib/components/apps/components/layout/ListWrapper.svelte @@ -5,10 +5,11 @@ export let index: number export let value: any + export let disabled = false - const ctx = writable({ index, value }) + const ctx = writable({ index, value, disabled }) - $: $ctx = { index, value } + $: $ctx = { index, value, disabled } setContext('ListWrapperContext', ctx) diff --git a/frontend/src/lib/components/apps/editor/RecomputeAllComponents.svelte b/frontend/src/lib/components/apps/editor/RecomputeAllComponents.svelte index 92f39674c7..a2106c2bef 100644 --- a/frontend/src/lib/components/apps/editor/RecomputeAllComponents.svelte +++ b/frontend/src/lib/components/apps/editor/RecomputeAllComponents.svelte @@ -99,6 +99,10 @@ ] + +