From b91919e6d1a2088411985e3d83e545a7e33fb083 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 8 Feb 2022 15:00:16 +0000 Subject: [PATCH] change naming of var --- .../builder/src/builderStore/store/automation/index.js | 2 +- .../AutomationBuilder/FlowChart/ConfigModal.svelte | 2 +- .../automation/SetupPanel/RowSelector.svelte | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/builderStore/store/automation/index.js b/packages/builder/src/builderStore/store/automation/index.js index e2b9e53eda..148fe4fdd2 100644 --- a/packages/builder/src/builderStore/store/automation/index.js +++ b/packages/builder/src/builderStore/store/automation/index.js @@ -122,7 +122,7 @@ const automationActions = store => ({ }, toggleFieldControl: value => { store.update(state => { - state.selectedAutomation.automation.rowFieldControl = value + state.selectedAutomation.automation.rowControl = value return state }) }, diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ConfigModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ConfigModal.svelte index 26a95f8860..94bb73ce1e 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ConfigModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ConfigModal.svelte @@ -3,7 +3,7 @@ import { ModalContent, Toggle } from "@budibase/bbui" - $: rowControl = $automationStore.selectedAutomation.automation.rowFieldControl + $: rowControl = $automationStore.selectedAutomation.automation.rowControl async function toggleFieldControl(evt) { await automationStore.actions.toggleFieldControl(evt.detail) await automationStore.actions.save( diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte index 8a09b0b091..2a58919558 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte @@ -51,13 +51,17 @@ if (type === "number") { return Number(value) } - if (type === "options" || type === "link") { + if (type === "options") { return [value] } if (type === "array") { return value.split(",") } + if (type === "link") { + return [value] + } + return value } @@ -84,7 +88,7 @@ {#if !schema.autocolumn} {#if schema.type !== "attachment"} {#if $automationStore.selectedAutomation.automation.testData} - {#if $automationStore.selectedAutomation.automation.rowFieldControl} + {#if $automationStore.selectedAutomation.automation.rowControl} {/if} - {:else if $automationStore.selectedAutomation.automation.rowFieldControl} + {:else if $automationStore.selectedAutomation.automation.rowControl} {:else}