Replaced global selectedAutomation with memoised parameter

This commit is contained in:
Dean 2024-10-02 09:23:37 +01:00
parent 47904a2b1e
commit a9b747d88d
1 changed files with 4 additions and 3 deletions

View File

@ -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,
},
}
}