From b36311fc2c569dde094900032c0e2d4eb4c3accf Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 3 Jul 2024 10:25:46 +0100 Subject: [PATCH] Added fix for Update step table select. The fix for the oldRow behaviour broke the picker --- .../automation/SetupPanel/AutomationBlockSetup.svelte | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 1de79fb283..55c18a6503 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -272,7 +272,7 @@ isUpdateRow: block.stepId === ActionStepID.UPDATE_ROW, } - if (currentStep?.rowType === "oldRow") { + if (isTestModal && currentStep?.rowType === "oldRow") { return [ { type: RowSelector, @@ -325,12 +325,15 @@ isTrigger, value: inputData["row"]?.tableId ?? "", onChange: e => { + const rowKey = $stepStore?.[block.id]?.rowType || "row" onChange({ _tableId: e.detail, meta: {}, - [$stepStore?.[block.id]?.rowType]: { - tableId: e.detail, - }, + [rowKey]: e.detail + ? { + tableId: e.detail, + } + : {}, }) }, disabled: isTestModal,