change naming of var
This commit is contained in:
parent
ca821f2a47
commit
b91919e6d1
|
@ -122,7 +122,7 @@ const automationActions = store => ({
|
||||||
},
|
},
|
||||||
toggleFieldControl: value => {
|
toggleFieldControl: value => {
|
||||||
store.update(state => {
|
store.update(state => {
|
||||||
state.selectedAutomation.automation.rowFieldControl = value
|
state.selectedAutomation.automation.rowControl = value
|
||||||
return state
|
return state
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
import { ModalContent, Toggle } from "@budibase/bbui"
|
import { ModalContent, Toggle } from "@budibase/bbui"
|
||||||
|
|
||||||
$: rowControl = $automationStore.selectedAutomation.automation.rowFieldControl
|
$: rowControl = $automationStore.selectedAutomation.automation.rowControl
|
||||||
async function toggleFieldControl(evt) {
|
async function toggleFieldControl(evt) {
|
||||||
await automationStore.actions.toggleFieldControl(evt.detail)
|
await automationStore.actions.toggleFieldControl(evt.detail)
|
||||||
await automationStore.actions.save(
|
await automationStore.actions.save(
|
||||||
|
|
|
@ -51,13 +51,17 @@
|
||||||
if (type === "number") {
|
if (type === "number") {
|
||||||
return Number(value)
|
return Number(value)
|
||||||
}
|
}
|
||||||
if (type === "options" || type === "link") {
|
if (type === "options") {
|
||||||
return [value]
|
return [value]
|
||||||
}
|
}
|
||||||
if (type === "array") {
|
if (type === "array") {
|
||||||
return value.split(",")
|
return value.split(",")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type === "link") {
|
||||||
|
return [value]
|
||||||
|
}
|
||||||
|
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +88,7 @@
|
||||||
{#if !schema.autocolumn}
|
{#if !schema.autocolumn}
|
||||||
{#if schema.type !== "attachment"}
|
{#if schema.type !== "attachment"}
|
||||||
{#if $automationStore.selectedAutomation.automation.testData}
|
{#if $automationStore.selectedAutomation.automation.testData}
|
||||||
{#if $automationStore.selectedAutomation.automation.rowFieldControl}
|
{#if $automationStore.selectedAutomation.automation.rowControl}
|
||||||
<RowSelectorTypes
|
<RowSelectorTypes
|
||||||
{field}
|
{field}
|
||||||
{schema}
|
{schema}
|
||||||
|
@ -103,7 +107,7 @@
|
||||||
{bindings}
|
{bindings}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
{:else if $automationStore.selectedAutomation.automation.rowFieldControl}
|
{:else if $automationStore.selectedAutomation.automation.rowControl}
|
||||||
<RowSelectorTypes {field} {schema} {bindings} {value} {onChange} />
|
<RowSelectorTypes {field} {schema} {bindings} {value} {onChange} />
|
||||||
{:else}
|
{:else}
|
||||||
<DrawerBindableInput
|
<DrawerBindableInput
|
||||||
|
|
Loading…
Reference in New Issue