Watch for changes on the options input, which is a grandchild of base-form

This commit is contained in:
Montana
2019-05-01 17:22:32 -04:00
parent 5692088837
commit 416ea1de82
7 changed files with 18 additions and 9 deletions

View File

@@ -1,8 +1,11 @@
import { emitEvent } from '../lib/emitters'
import FormMixin from '../mixins/form'
export default {
name: 'optionsinput',
mixins: [FormMixin],
props: {
name: String,
initialErrors: {
@@ -10,6 +13,10 @@ export default {
default: () => [],
},
initialValue: String,
watch: {
type: Boolean,
default: false,
},
},
data: function() {
@@ -27,6 +34,7 @@ export default {
emitEvent('field-change', this, {
value: e.target.value,
name: this.name,
watch: this.watch,
})
this.showError = false
this.showValid = true