diff --git a/apps/workflowengine/src/components/Checks/FileMimeType.vue b/apps/workflowengine/src/components/Checks/FileMimeType.vue index bd0d80f697c..6817b128e27 100644 --- a/apps/workflowengine/src/components/Checks/FileMimeType.vue +++ b/apps/workflowengine/src/components/Checks/FileMimeType.vue @@ -4,8 +4,7 @@ --> @@ -45,6 +44,7 @@ export default { default: () => { return {} }, }, }, + emits: ['update:model-value'], data() { return { groups, @@ -54,12 +54,17 @@ export default { }, computed: { currentValue: { - get: function () { + get() { return this.groups.find(group => group.id === this.newValue) || null }, - set: function (value) { + set(value) { this.newValue = value - } + }, + }, + }, + watch: { + modelValue() { + this.updateInternalValue() }, }, async mounted() { @@ -72,12 +77,6 @@ export default { await this.searchAsync(this.newValue) } }, - emits: ['update:model-value'], - watch: { - modelValue() { - this.updateInternalValue() - }, - }, methods: { t, @@ -111,7 +110,7 @@ export default { update(value) { this.newValue = value.id this.$emit('update:model-value', this.newValue) - } + }, }, }