From a9b747d88d3e38e3a633dd0d89b5917781174127 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 2 Oct 2024 09:23:37 +0100 Subject: [PATCH] Replaced global selectedAutomation with memoised parameter --- .../automation/SetupPanel/AutomationBlockSetup.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index aa91962b24..f6f5308f27 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -63,6 +63,7 @@ import PropField from "./PropField.svelte" import { utils } from "@budibase/shared-core" + export let automation export let block export let testData export let schemaProperties @@ -107,7 +108,7 @@ $: automationBindings = automationStore.actions.getPathBindings( $memoBlock.id, - $selectedAutomation + automation ) $: environmentBindings = buildEnvironmentBindings($memoEnvVariables) $: bindings = [...automationBindings, ...environmentBindings] @@ -435,7 +436,7 @@ if ( Object.hasOwn(update, "tableId") && - $selectedAutomation.testData?.row?.tableId !== update.tableId + automation.testData?.row?.tableId !== update.tableId ) { const reqSchema = getSchemaForDatasourcePlus(update.tableId, { searchableSchema: true, @@ -567,7 +568,7 @@ ...newTestData, body: { ...update, - ...$selectedAutomation.testData?.body, + ...automation.testData?.body, }, } }