From c99835a9051d1a1bc79a090ebf9a8fcc38bb7220 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 29 Jun 2023 23:56:37 +0200 Subject: [PATCH] fix toggle and list reactivity for apps --- .../apps/components/inputs/AppCheckbox.svelte | 31 ++--- .../apps/components/layout/AppList.svelte | 118 +++++++++--------- 2 files changed, 66 insertions(+), 83 deletions(-) diff --git a/frontend/src/lib/components/apps/components/inputs/AppCheckbox.svelte b/frontend/src/lib/components/apps/components/inputs/AppCheckbox.svelte index 6ccba8ac49..eb31fc29df 100644 --- a/frontend/src/lib/components/apps/components/inputs/AppCheckbox.svelte +++ b/frontend/src/lib/components/apps/components/inputs/AppCheckbox.svelte @@ -1,7 +1,7 @@ -{#each Object.keys(components['checkboxcomponent'].initialData.configuration) as key (key)} - -{/each} + + { diff --git a/frontend/src/lib/components/apps/components/layout/AppList.svelte b/frontend/src/lib/components/apps/components/layout/AppList.svelte index 21d59e6c72..36b7b8d477 100644 --- a/frontend/src/lib/components/apps/components/layout/AppList.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppList.svelte @@ -58,70 +58,64 @@ -{#if render} - - + + -
- {#if $app.subgrids?.[`${id}-0`]} - {#if Array.isArray(result) && result.length > 0} - {#each result ?? [] as value, index} -
+ {#if $app.subgrids?.[`${id}-0`]} + {#if Array.isArray(result) && result.length > 0} + {#each result ?? [] as value, index} +
+ { + outputs?.inputs.set(inputs, true) + }} + bind:inputs + {value} + {index} > - { - outputs?.inputs.set(inputs, true) + { + if (!$connectingInput.opened) { + $selectedComponent = [id] + } + onFocus() }} - bind:inputs - {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} -
-
-{:else} - - - -{/if} + {/if} + +