diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 3d857ec9fb..19940d2fc6 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -25,7 +25,6 @@ import QueryParamSelector from "./QueryParamSelector.svelte" import CronBuilder from "./CronBuilder.svelte" import Editor from "components/integration/QueryEditor.svelte" - import { debounce } from "lodash" import ModalBindableInput from "components/common/bindings/ModalBindableInput.svelte" import FilterDrawer from "components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte" import { LuceneUtils } from "@budibase/frontend-core" @@ -54,7 +53,8 @@ $: schema = getSchemaForTable(tableId, { searchableSchema: true }).schema $: schemaFields = Object.values(schema || {}) - const onChange = debounce(async function (e, key) { + const onChange = async (e, key) => { + console.log(e, key) try { if (isTestModal) { // Special case for webhook, as it requires a body, but the schema already brings back the body's contents @@ -82,7 +82,7 @@ } catch (error) { notifications.error("Error saving automation") } - }, 800) + } function getAvailableBindings(block, automation) { if (!block || !automation) { @@ -205,6 +205,7 @@ on:change={e => onChange(e, key)} {bindings} allowJS={false} + updateOnChange={false} /> {/if} {:else if value.customType === "query"} @@ -281,6 +282,7 @@ value={inputData[key]} on:change={e => onChange(e, key)} {bindings} + updateOnChange={false} /> {/if} diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte index 971a9cc51b..f7712272ba 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte @@ -43,6 +43,11 @@ } const coerce = (value, type) => { + var re = new RegExp(/{{([^{].*?)}}/g) + if (re.test(value)) { + return value + } + if (type === "boolean") { if (typeof value === "boolean") { return value @@ -120,6 +125,7 @@ {bindings} fillWidth={true} allowJS={true} + updateOnChange={false} /> {/if} {:else if !rowControl} @@ -137,6 +143,7 @@ {bindings} fillWidth={true} allowJS={true} + updateOnChange={false} /> {/if} {/if} diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte index 2a51e8d200..f66df3a9b1 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte @@ -60,5 +60,6 @@ {bindings} fillWidth={true} allowJS={true} + updateOnChange={false} /> {/if} diff --git a/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte b/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte index 92e9c2b5a8..b162408b26 100644 --- a/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte +++ b/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte @@ -17,6 +17,7 @@ export let disabled = false export let fillWidth export let allowJS = true + export let updateOnChange = true const dispatch = createEventDispatcher() let bindingDrawer @@ -44,6 +45,7 @@ value={isJS ? "(JavaScript function)" : readableValue} on:change={event => onChange(event.detail)} {placeholder} + {updateOnChange} /> {#if !disabled}