From c75fd751b01332447671166dcaf18d4f2b3a5ccc Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 15 Jun 2025 23:57:55 +0200 Subject: [PATCH] nits app builder --- .../components/buttons/AppSchemaForm.svelte | 3 +- .../apps/components/inputs/AppSelect.svelte | 103 +++++++++++------- 2 files changed, 63 insertions(+), 43 deletions(-) diff --git a/frontend/src/lib/components/apps/components/buttons/AppSchemaForm.svelte b/frontend/src/lib/components/apps/components/buttons/AppSchemaForm.svelte index b5e149c134..f4a585dd70 100644 --- a/frontend/src/lib/components/apps/components/buttons/AppSchemaForm.svelte +++ b/frontend/src/lib/components/apps/components/buttons/AppSchemaForm.svelte @@ -66,7 +66,6 @@ let args: Record = $state(!iterContext ? (outputs?.values?.peak() ?? {}) : {}) function handleArgsChange() { - // console.log('handleArgsChange', args) const newArgs: Record = {} for (const key in args) { @@ -74,7 +73,6 @@ newArgs[key] = args[key] } } - outputs.values.set(newArgs, true) if (iterContext && listInputs) { listInputs.set(id, newArgs) @@ -130,6 +128,7 @@ for (const key in args) { args[key] } + result untrack(() => handleArgsChange()) }) $effect(() => { diff --git a/frontend/src/lib/components/apps/components/inputs/AppSelect.svelte b/frontend/src/lib/components/apps/components/inputs/AppSelect.svelte index 2f35f531dd..5c9fff9c35 100644 --- a/frontend/src/lib/components/apps/components/inputs/AppSelect.svelte +++ b/frontend/src/lib/components/apps/components/inputs/AppSelect.svelte @@ -1,5 +1,5 @@ {#each Object.keys(components['selectcomponent'].initialData.configuration) as key (key)} @@ -239,7 +258,7 @@
{ + onpointerdown={(e) => { if (!e.shiftKey) { e.stopPropagation() } @@ -247,7 +266,7 @@ > {#if Array.isArray(listItems) && listItems.every((x) => x && typeof x == 'object' && typeof x['label'] == 'string' && `value` in x)} {#if resolvedConfig.nativeHtmlSelect} - {#if resolvedConfig.placeholder} {/if} @@ -283,16 +302,18 @@ >
- -
- - The selectable items should be an array of {'{"value": any, "label":}'}. Found: -
{JSON.stringify(listItems, null, 4)}
-
-
-
+ {#snippet text()} + +
+ + The selectable items should be an array of {'{"value": any, "label":}'}. Found: +
{JSON.stringify(listItems, null, 4)}
+
+
+
+ {/snippet} {/if}