From 3c2cb3dda1fece9f731fed508b7557edce1da484 Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 23 Aug 2024 12:24:22 +0100 Subject: [PATCH] Simplify the approach to leave change behaviour as it is and leave persistence to the close behaviour --- .../automation/SetupPanel/AutomationBlockSetup.svelte | 7 +------ .../src/components/common/CodeEditor/CodeEditor.svelte | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 72eacfa0bb..6c4865b539 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -1078,15 +1078,10 @@ > { + on:change={e => { // need to pass without the value inside inputData[key] = e.detail }} - on:insert={e => { - // Blur events only happen once after inserting a binding - // State will now update on insert - inputData[key] = e.detail - }} completions={stepCompletions} mode={codeMode} autocompleteEnabled={codeMode !== EditorModes.JS} diff --git a/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte b/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte index 1f8313e15d..c3e4835f96 100644 --- a/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte +++ b/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte @@ -140,7 +140,6 @@ } : undefined, }) - dispatch("insert", editor.state.doc.toString()) } // Match decoration for HBS bindings