File tree Expand file tree Collapse file tree
apps/workflowengine/src/components/Checks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44-->
55<template >
66 <div >
7- <NcSelect
8- :model-value =" currentValue"
7+ <NcSelect :model-value =" currentValue"
98 :placeholder =" t('workflowengine', 'Select a file type')"
109 label =" label"
1110 :options =" options"
3130 </template >
3231 </NcSelect >
3332 <input v-if =" !isPredefined"
34- :value =" currentValue.id"
33+ :value =" currentValue.id"
3534 type =" text"
3635 :placeholder =" t('workflowengine', 'e.g. httpd/unix-directory')"
3736 @input =" updateCustom" >
@@ -49,6 +48,12 @@ export default {
4948 NcEllipsisedOption,
5049 NcSelect,
5150 },
51+ props: {
52+ modelValue: {
53+ type: String ,
54+ default: ' ' ,
55+ },
56+ },
5257
5358 emits: [' update:model-value' ],
5459
@@ -79,17 +84,6 @@ export default {
7984 newValue: ' ' ,
8085 }
8186 },
82- props: {
83- modelValue: {
84- type: String ,
85- default: ' ' ,
86- },
87- },
88- watch: {
89- modelValue () {
90- this .updateInternalValue ()
91- },
92- },
9387 computed: {
9488 options () {
9589 return [... this .predefinedTypes , this .customValue ]
@@ -120,6 +114,11 @@ export default {
120114 }
121115 },
122116 },
117+ watch: {
118+ modelValue () {
119+ this .updateInternalValue ()
120+ },
121+ },
123122
124123 methods: {
125124 validateRegex (string ) {
Original file line number Diff line number Diff line change @@ -34,18 +34,13 @@ export default {
3434 components: {
3535 NcSelect,
3636 },
37- emits: [' update:model-value' ],
3837 props: {
3938 modelValue: {
4039 type: String ,
4140 default: ' []' ,
4241 },
4342 },
44- watch: {
45- modelValue () {
46- this .updateInternalValue ()
47- },
48- },
43+ emits: [' update:model-value' ],
4944 data () {
5045 return {
5146 timezones: zones,
@@ -55,9 +50,14 @@ export default {
5550 endTime: null ,
5651 timezone: moment .tz .guess (),
5752 },
58- stringifiedValue : ' []'
53+ stringifiedValue: ' []' ,
5954 }
6055 },
56+ watch: {
57+ modelValue () {
58+ this .updateInternalValue ()
59+ },
60+ },
6161 beforeMount () {
6262 // this is necessary to keep so the value is re-applied when a different
6363 // check is being removed.
Original file line number Diff line number Diff line change 44-->
55<template >
66 <div >
7- <NcSelect :value = " currentValue "
8- v-model = " newValue "
7+ <NcSelect v-model = " newValue "
8+ :value = " currentValue "
99 :placeholder =" t('workflowengine', 'Select a request URL')"
1010 label =" label"
1111 :clearable =" false"
@@ -46,6 +46,16 @@ export default {
4646 mixins: [
4747 valueMixin,
4848 ],
49+ props: {
50+ modelValue: {
51+ type: String ,
52+ default: ' ' ,
53+ },
54+ operator: {
55+ type: String ,
56+ default: ' ' ,
57+ },
58+ },
4959
5060 emits: [' update:model-value' ],
5161
@@ -61,16 +71,6 @@ export default {
6171 ],
6272 }
6373 },
64- props: {
65- modelValue: {
66- type: String ,
67- default: ' ' ,
68- },
69- operator: {
70- type: String ,
71- default: ' ' ,
72- },
73- },
7474 computed: {
7575 options () {
7676 return [... this .predefinedTypes , this .customValue ]
Original file line number Diff line number Diff line change 2424 </template >
2525 </NcSelect >
2626 <input v-if =" !isPredefined"
27- type =" text"
2827 v-model =" newValue"
28+ type =" text"
2929 @input =" updateCustom" >
3030 </div >
3131</template >
@@ -41,16 +41,16 @@ export default {
4141 NcEllipsisedOption,
4242 NcSelect,
4343 },
44- emits: [' update:model-value' ],
4544 mixins: [
4645 valueMixin,
4746 ],
4847 props: {
4948 modelValue: {
5049 type: String ,
5150 default: ' ' ,
52- }
51+ },
5352 },
53+ emits: [' update:model-value' ],
5454 data () {
5555 return {
5656 newValue: ' ' ,
@@ -81,7 +81,7 @@ export default {
8181 }
8282 },
8383 currentValue: {
84- get : function () {
84+ get () {
8585 if (this .matchingPredefined ) {
8686 return this .matchingPredefined
8787 }
@@ -91,9 +91,9 @@ export default {
9191 id: this .newValue ,
9292 }
9393 },
94- set : function (value ) {
94+ set (value ) {
9595 this .newValue = value
96- }
96+ },
9797 },
9898 },
9999 methods: {
Original file line number Diff line number Diff line change 1010 :loading =" status.isLoading && groups.length === 0"
1111 :placeholder =" t('workflowengine', 'Type to search for group …')"
1212 :options =" groups"
13- :model-value =" currentValue"
13+ :model-value =" currentValue"
1414 label =" displayname"
1515 @search =" searchAsync"
16- @input =" update"
17- />
16+ @input =" update" />
1817 </div >
1918</template >
2019
@@ -45,6 +44,7 @@ export default {
4544 default : () => { return {} },
4645 },
4746 },
47+ emits: [' update:model-value' ],
4848 data () {
4949 return {
5050 groups,
@@ -54,12 +54,17 @@ export default {
5454 },
5555 computed: {
5656 currentValue: {
57- get : function () {
57+ get () {
5858 return this .groups .find (group => group .id === this .newValue ) || null
5959 },
60- set : function (value ) {
60+ set (value ) {
6161 this .newValue = value
62- }
62+ },
63+ },
64+ },
65+ watch: {
66+ modelValue () {
67+ this .updateInternalValue ()
6368 },
6469 },
6570 async mounted () {
@@ -72,12 +77,6 @@ export default {
7277 await this .searchAsync (this .newValue )
7378 }
7479 },
75- emits: [' update:model-value' ],
76- watch: {
77- modelValue () {
78- this .updateInternalValue ()
79- },
80- },
8180 methods: {
8281 t,
8382
@@ -111,7 +110,7 @@ export default {
111110 update (value ) {
112111 this .newValue = value .id
113112 this .$emit (' update:model-value' , this .newValue )
114- }
113+ },
115114 },
116115}
117116 </script >
You can’t perform that action at this time.
0 commit comments