From 68aca8b6302b040c5edd2e694a0247072e6ee695 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 16 Apr 2021 13:07:38 +0100 Subject: [PATCH] Update some more parts of the builder to use new form components --- .../common/DrawerBindableInput.svelte | 3 +-- .../EventsEditor/actions/SaveFields.svelte | 16 +++++------ .../EventsEditor/actions/SaveRow.svelte | 27 +++++++++---------- 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/packages/builder/src/components/common/DrawerBindableInput.svelte b/packages/builder/src/components/common/DrawerBindableInput.svelte index 647638e8c9..fecce0705b 100644 --- a/packages/builder/src/components/common/DrawerBindableInput.svelte +++ b/packages/builder/src/components/common/DrawerBindableInput.svelte @@ -32,9 +32,8 @@
onChange(event.target.value)} + on:change={event => onChange(event.detail)} {placeholder} />
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveFields.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveFields.svelte index 5b9237fb93..245d13a113 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveFields.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveFields.svelte @@ -53,15 +53,9 @@ {#if schemaFields} + on:change={event => updateFieldName(idx, event.detail)} + options={schemaFields.map(field => field.name)} /> {:else} updateFieldValue(idx, event.detail)} />
-
{/each}
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveRow.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveRow.svelte index a94a5e3002..15ab91983a 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveRow.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveRow.svelte @@ -15,7 +15,7 @@ $store.selectedComponentId ) $: schemaFields = getSchemaFields(parameters?.tableId) - $: tableOptions = $tables || [] + $: tableOptions = $tables.list || [] const getSchemaFields = tableId => { const { schema } = getSchemaForDatasource({ type: "table", tableId }) @@ -35,20 +35,19 @@
- + - - {/each} - +