1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

fix: issue with ENUM and SET fields on table filler modal

This commit is contained in:
2021-05-13 20:46:44 +02:00
parent 7a62131cc7
commit 475397ca34
3 changed files with 29 additions and 4 deletions

View File

@ -66,6 +66,21 @@
:type="inputProps().type"
:disabled="!isChecked"
>
<select
v-else-if="enumArray"
v-model="selectedValue"
class="form-select"
:disabled="!isChecked"
@change="onChange"
>
<option
v-for="val in enumArray"
:key="val"
:value="val"
>
{{ val }}
</option>
</select>
<input
v-else
ref="formInput"
@ -121,7 +136,8 @@ export default {
selectedMethod: '',
selectedValue: '',
debounceTimeout: null,
methodParams: {}
methodParams: {},
enumArray: null
};
},
computed: {
@ -150,8 +166,14 @@ export default {
},
watch: {
fieldObj () {
if (this.fieldObj)
this.selectedValue = this.fieldObj.value;
if (this.fieldObj) {
if (Array.isArray(this.fieldObj.value)) {
this.enumArray = this.fieldObj.value;
this.selectedValue = this.fieldObj.value[0];
}
else
this.selectedValue = this.fieldObj.value;
}
},
selectedGroup () {
if (this.fakerMethods.length)