added persist call to change enum input

This commit is contained in:
Joel McKinnon 2020-03-26 09:03:32 -07:00
parent a81009541c
commit 4a07ddbefc

View File

@ -64,7 +64,9 @@
<span v-if="inputCount && criterion.operation" <span v-if="inputCount && criterion.operation"
class="c-cdef__control" class="c-cdef__control"
> >
<select v-model="criterion.input[0]"> <select v-model="criterion.input[0]"
@change="persist"
>
<option v-for="option in enumerations" <option v-for="option in enumerations"
:key="option.string" :key="option.string"
:value="option.value.toString()" :value="option.value.toString()"
@ -180,12 +182,11 @@ export default {
} }
}, },
updateOperations(ev) { updateOperations(ev) {
if (ev && ev.target.classList.contains('js-metadata-select')) { if (ev) {
this.clearDependentFields(ev.target); this.clearDependentFields(ev.target);
this.persist(); this.persist();
} }
this.getOperationFormat(); this.getOperationFormat();
}, },
updateOperationInputVisibility(ev) { updateOperationInputVisibility(ev) {
if (ev) { if (ev) {
@ -210,9 +211,6 @@ export default {
this.criterion.input = []; this.criterion.input = [];
this.inputCount = 0; this.inputCount = 0;
}, },
updateMetadataSelection() {
this.updateOperationInputVisibility();
},
persist() { persist() {
this.$emit('persist', this.criterion); this.$emit('persist', this.criterion);
} }