diff --git a/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte b/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte index cc6c38a364..5862a9883e 100644 --- a/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte @@ -122,7 +122,9 @@ {/if} {:else if $app.subgrids} + {JSON.stringify(resolvedConditions)} {#each resolvedConditions ?? [] as _res, i} + {i} {/each} {/if} diff --git a/frontend/src/lib/components/apps/components/layout/AppList.svelte b/frontend/src/lib/components/apps/components/layout/AppList.svelte index 44e0a56509..6498410036 100644 --- a/frontend/src/lib/components/apps/components/layout/AppList.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppList.svelte @@ -153,75 +153,73 @@ ? 'divide-y flex-col' : 'flex-col'}" > - {#if $app.subgrids?.[`${id}-0`]} - {#if Array.isArray(result) && result.length > 0} - {#each result ?? [] as value, index (index)} - {@const inRange = index <= pagination.maxIndex && index >= pagination.indexOffset} -
0} + {#each result ?? [] as value, index (index)} + {@const inRange = index <= pagination.maxIndex && index >= pagination.indexOffset} +
+ { + if (!inputs[id]) { + inputs[id] = { [index]: value } + } else { + inputs[id] = { ...inputs[id], [index]: value } + } + outputs?.inputs.set(inputs, true) + }} + onRemove={(id) => { + if (inputs?.[id] == undefined) { + return + } + if (index == 0) { + delete inputs[id] + inputs = { ...inputs } + } else { + delete inputs[id][index] + inputs[id] = { ...inputs[id] } + } + outputs?.inputs.set(inputs, true) + }} + {value} + {index} > - { - if (!inputs[id]) { - inputs[id] = { [index]: value } - } else { - inputs[id] = { ...inputs[id], [index]: value } + { + if (!$connectingInput.opened) { + $selectedComponent = [id] } - outputs?.inputs.set(inputs, true) + onFocus() }} - onRemove={(id) => { - if (inputs?.[id] == undefined) { - return - } - if (index == 0) { - delete inputs[id] - inputs = { ...inputs } - } else { - delete inputs[id][index] - inputs[id] = { ...inputs[id] } - } - outputs?.inputs.set(inputs, true) - }} - {value} - {index} - > - { - if (!$connectingInput.opened) { - $selectedComponent = [id] - } - onFocus() - }} - /> - -
- {/each} - {:else} - - - - {#if !Array.isArray(result)} -
Input data is not an array
- {/if} + /> + +
+ {/each} + {:else} + + + + {#if !Array.isArray(result)} +
Input data is not an array
{/if} {/if} diff --git a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte index 96b4b6cbb8..30cb92bfa6 100644 --- a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte +++ b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte @@ -329,4 +329,8 @@ {/if} +{:else} + {#each $app?.subgrids?.[subGridId] ?? [] as item} + + {/each} {/if}