diff --git a/packages/editor-ui/src/components/ParameterInput.vue b/packages/editor-ui/src/components/ParameterInput.vue index e3fecf8da6f97..b93fe6658971a 100644 --- a/packages/editor-ui/src/components/ParameterInput.vue +++ b/packages/editor-ui/src/components/ParameterInput.vue @@ -421,7 +421,7 @@ export default mixins( return false; }, - expressionValueComputed (): NodeParameterValue | null { + expressionValueComputed (): NodeParameterValue | string[] | null { if (this.areExpressionsDisabled) { return this.value; } @@ -733,7 +733,7 @@ export default mixins( this.$emit('textInput', parameterData); }, - valueChanged (value: string | number | boolean | Date | null) { + valueChanged (value: string[] | string | number | boolean | Date | null) { if (value instanceof Date) { value = value.toISOString(); } @@ -768,7 +768,14 @@ export default mixins( this.expressionEditDialogVisible = true; this.trackExpressionEditOpen(); } else if (command === 'removeExpression') { - this.valueChanged(this.expressionValueComputed !== undefined ? this.expressionValueComputed : null); + let value = this.expressionValueComputed; + + if (this.parameter.type === 'multiOptions' && typeof value === 'string') { + value = (value || '').split(',') + .filter((value) => (this.parameterOptions || []).find((option) => option.value === value)); + } + + this.valueChanged(typeof value !== 'undefined' ? value : null); } else if (command === 'refreshOptions') { this.loadRemoteParameterOptions(); }