aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2025-03-19 22:33:50 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2025-04-03 14:12:53 +0200
commit355b2ffda6804e79dbb582a498ee62739a883ed9 (patch)
tree217bb38e58b7be3dca6b64e4d5edf9ba1fe0ca06
parente97b4702daf4db4cb49a247546e571c8f2b76e90 (diff)
downloadnextcloud-server-355b2ffda6804e79dbb582a498ee62739a883ed9.tar.gz
nextcloud-server-355b2ffda6804e79dbb582a498ee62739a883ed9.zip
fix(workflowengine): use adapted mixin again in FileMimeType
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r--apps/workflowengine/src/components/Checks/FileMimeType.vue16
-rw-r--r--apps/workflowengine/src/mixins/valueMixin.js23
2 files changed, 7 insertions, 32 deletions
diff --git a/apps/workflowengine/src/components/Checks/FileMimeType.vue b/apps/workflowengine/src/components/Checks/FileMimeType.vue
index 70f57ac2d55..34f3dfd6de2 100644
--- a/apps/workflowengine/src/components/Checks/FileMimeType.vue
+++ b/apps/workflowengine/src/components/Checks/FileMimeType.vue
@@ -51,6 +51,7 @@ export default {
NcSelect,
},
mixins: [
+ valueMixin
],
emits: ['update:model-value'],
@@ -79,7 +80,6 @@ export default {
id: 'application/pdf',
},
],
- newValue: [],
}
},
props: {
@@ -88,9 +88,6 @@ export default {
default: '',
},
},
- beforeMount() {
- this.updateInternalValue()
- },
computed: {
options() {
return [...this.predefinedTypes, this.customValue]
@@ -121,12 +118,7 @@ export default {
}
},
},
- watch: {
- modelValue() {
- console.error("DEBUG: watch modelValue fileSystemTag")
- this.updateInternalValue()
- },
- },
+
methods: {
validateRegex(string) {
const regexRegex = /^\/(.*)\/([gui]{0,3})$/
@@ -143,10 +135,6 @@ export default {
this.newValue = event.target.value || event.detail[0]
this.$emit('update:model-value', this.newValue)
},
- updateInternalValue() {
- console.error("DEBUG: updateInternalValue filemimetype " + this.modelValue)
- this.newValue = this.modelValue
- },
},
}
</script>
diff --git a/apps/workflowengine/src/mixins/valueMixin.js b/apps/workflowengine/src/mixins/valueMixin.js
index b34a2e13b5f..1293cd2483c 100644
--- a/apps/workflowengine/src/mixins/valueMixin.js
+++ b/apps/workflowengine/src/mixins/valueMixin.js
@@ -4,32 +4,19 @@
*/
const valueMixin = {
- props: {
- value: {
- type: String,
- default: '',
- },
- check: {
- type: Object,
- default: () => { return {} },
- },
- },
data() {
return {
- newValue: '',
+ newValue: [],
}
},
watch: {
- value: {
- immediate: true,
- handler(value) {
- this.updateInternalValue(value)
- },
+ modelValue() {
+ this.updateInternalValue()
},
},
methods: {
- updateInternalValue(value) {
- this.newValue = value
+ updateInternalValue() {
+ this.newValue = this.modelValue
},
},
}