diff --git a/apps/workflowengine/src/components/Check.vue b/apps/workflowengine/src/components/Check.vue index f560303b360c4..136f6d21280c1 100644 --- a/apps/workflowengine/src/components/Check.vue +++ b/apps/workflowengine/src/components/Check.vue @@ -19,8 +19,18 @@ :clearable="false" :placeholder="t('workflowengine', 'Select a comparator')" @input="updateCheck" /> + operator.operator === this.check.operator) + if (this.currentElement) { + // If we do not set it, the check`s value would remain empty. Unsure why Vue behaves this way. + this.$refs.checkComponent.modelValue = undefined + } else if (this.currentOption?.component) { + // keeping this in an else for apps that try to be backwards compatible and may ship both + // to be removed in 03/2028 + console.warn('Developer warning: `CheckPlugin.options` is deprecated. Use `CheckPlugin.element` instead.') + } + if (this.check.class === null) { this.$nextTick(() => this.$refs.checkSelector.$el.focus()) } @@ -141,11 +165,15 @@ export default { this.check.invalid = !this.valid this.$emit('validate', this.valid) }, - updateCheck() { - const matchingOperator = this.operators.findIndex((operator) => this.check.operator === operator.operator) + updateCheck(event) { + const selectedOperator = event?.operator || this.currentOperator?.operator || this.check.operator + const matchingOperator = this.operators.findIndex((operator) => selectedOperator === operator.operator) if (this.check.class !== this.currentOption.class || matchingOperator === -1) { this.currentOperator = this.operators[0] } + if (event?.detail) { + this.check.value = event.detail[0] + } // eslint-disable-next-line vue/no-mutating-props this.check.class = this.currentOption.class // eslint-disable-next-line vue/no-mutating-props diff --git a/apps/workflowengine/src/components/Checks/FileMimeType.vue b/apps/workflowengine/src/components/Checks/FileMimeType.vue index 8a723ffb5b04d..6817b128e27c4 100644 --- a/apps/workflowengine/src/components/Checks/FileMimeType.vue +++ b/apps/workflowengine/src/components/Checks/FileMimeType.vue @@ -4,7 +4,7 @@ -->