From f5f5c7115ceb6c558683d27ceaf520e34f2b7eec Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Tue, 17 Jan 2023 12:33:57 +0100 Subject: [PATCH] Fix activity property input state loss --- .../input-control-switch/input-control-switch.tsx | 3 +-- .../components/shared/monaco-editor/monaco-editor.tsx | 9 --------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/designer/elsa-workflows-designer/src/components/designer/input-control-switch/input-control-switch.tsx b/src/designer/elsa-workflows-designer/src/components/designer/input-control-switch/input-control-switch.tsx index bc23627e6..b4ae9f817 100644 --- a/src/designer/elsa-workflows-designer/src/components/designer/input-control-switch/input-control-switch.tsx +++ b/src/designer/elsa-workflows-designer/src/components/designer/input-control-switch/input-control-switch.tsx @@ -20,12 +20,11 @@ export interface ExpressionChangedArs { export class InputControlSwitch { private contextMenu: HTMLElement; private monacoEditor: HTMLElsaMonacoEditorElement; - private defaultSyntaxValue: string; private contextMenuWidget: HTMLElement; private readonly onExpressionChangedDebounced: (e: MonacoValueChangedArgs) => void; constructor() { - this.onExpressionChangedDebounced = debounce(this.onExpressionChanged, 1000); + this.onExpressionChangedDebounced = debounce(this.onExpressionChanged, 10); } @Prop() label: string; diff --git a/src/designer/elsa-workflows-designer/src/components/shared/monaco-editor/monaco-editor.tsx b/src/designer/elsa-workflows-designer/src/components/shared/monaco-editor/monaco-editor.tsx index a2e9867d6..1e04cd4ba 100644 --- a/src/designer/elsa-workflows-designer/src/components/shared/monaco-editor/monaco-editor.tsx +++ b/src/designer/elsa-workflows-designer/src/components/shared/monaco-editor/monaco-editor.tsx @@ -39,15 +39,6 @@ export class MonacoEditor { this.monaco.editor.setModelLanguage(model, this.language); } - @Watch('value') - valueChangeHandler(newValue: string) { - if (!this.editor) - return; - - const model = this.editor.getModel(); - //model.setValue(newValue || ''); - } - @Method() async setJavaScriptLibs(libs: Array) { const monaco = this.monaco;