diff --git a/packages/editor-ui/src/components/ParameterInput.vue b/packages/editor-ui/src/components/ParameterInput.vue index 1a5740979d..c7e35e7e72 100644 --- a/packages/editor-ui/src/components/ParameterInput.vue +++ b/packages/editor-ui/src/components/ParameterInput.vue @@ -365,7 +365,7 @@ const getIssues = computed(() => { if (Array.isArray(displayValue.value)) { checkValues = checkValues.concat(displayValue.value); } else { - checkValues.push(displayValue.value as string); + checkValues = checkValues.concat(displayValue.value?.toString().split(',')); } } @@ -856,6 +856,8 @@ async function optionSelected(command: string) { (!props.modelValue || props.modelValue === '[Object: null]') ) { valueChanged('={{ 0 }}'); + } else if (props.parameter.type === 'multiOptions') { + valueChanged(`={{ ${JSON.stringify(props.modelValue)} }}`); } else if ( props.parameter.type === 'number' || props.parameter.type === 'boolean' || diff --git a/packages/editor-ui/src/components/ParameterInputWrapper.vue b/packages/editor-ui/src/components/ParameterInputWrapper.vue index 93534fede9..2027294400 100644 --- a/packages/editor-ui/src/components/ParameterInputWrapper.vue +++ b/packages/editor-ui/src/components/ParameterInputWrapper.vue @@ -132,8 +132,11 @@ const evaluatedExpression = computed>(() => { } if (props.isForCredential) opts.additionalKeys = resolvedAdditionalExpressionData.value; - - return { ok: true, result: workflowHelpers.resolveExpression(value, undefined, opts) }; + const stringifyExpressionResult = props.parameter.type !== 'multiOptions'; + return { + ok: true, + result: workflowHelpers.resolveExpression(value, undefined, opts, stringifyExpressionResult), + }; } catch (error) { return { ok: false, error }; }