From 16bd7610fc337fa5ba9b0088b91396bb13570bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 28 Dec 2022 10:37:42 +0100 Subject: [PATCH] feat(editor): Switch to expression on `=` input (#5044) :sparkles: Switch to expression on `=` input --- packages/editor-ui/src/components/ParameterInputFull.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/editor-ui/src/components/ParameterInputFull.vue b/packages/editor-ui/src/components/ParameterInputFull.vue index 7cf102f6af..e721164b22 100644 --- a/packages/editor-ui/src/components/ParameterInputFull.vue +++ b/packages/editor-ui/src/components/ParameterInputFull.vue @@ -54,6 +54,7 @@ :forceShowExpression="forceShowExpression" :hint="hint" @valueChanged="valueChanged" + @textInput="onTextInput" @focus="onFocus" @blur="onBlur" @drop="onDrop" @@ -207,6 +208,13 @@ export default mixins(showMessage).extend({ valueChanged(parameterData: IUpdateInformation) { this.$emit('valueChanged', parameterData); }, + onTextInput(parameterData: IUpdateInformation) { + const param = this.$refs.param as Vue | undefined; + + if (isValueExpression(this.parameter, parameterData.value)) { + param?.$emit('optionSelected', 'addExpression'); + } + }, onDrop(data: string) { this.forceShowExpression = true; setTimeout(() => {