From 6eee155ecb91c680c5a9d4f23502da35ab249a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milorad=20FIlipovi=C4=87?= Date: Tue, 15 Nov 2022 13:55:53 +0100 Subject: [PATCH] fix(editor): Update to 'Expression/Fixed' toggle - Keep expression when switching to Fixed (#4599) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ Keep the expression string when switching to `Fixed` parameter value --- packages/editor-ui/src/components/ParameterInput.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/ParameterInput.vue b/packages/editor-ui/src/components/ParameterInput.vue index 439ca9fc5a..8877a2ccde 100644 --- a/packages/editor-ui/src/components/ParameterInput.vue +++ b/packages/editor-ui/src/components/ParameterInput.vue @@ -1013,7 +1013,14 @@ export default mixins( if (this.isResourceLocatorParameter && isResourceLocatorValue(this.value)) { this.valueChanged({ __rl: true, value, mode: this.value.mode }); } else { - this.valueChanged(typeof value !== 'undefined' ? value : null); + let newValue = typeof value !== 'undefined' ? value : null; + + if (this.parameter.type === 'string') { + // Strip the '=' from the beginning + newValue = this.value ? this.value.toString().substring(1) : null; + } + + this.valueChanged(newValue); } } else if (command === 'refreshOptions') { if (this.isResourceLocatorParameter) {