Watch for changes on the options input, which is a grandchild of base-form
This commit is contained in:
@@ -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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import FormMixin from '../mixins/form'
|
||||
import textinput from './text_input'
|
||||
import optionsinput from './options_input'
|
||||
import textinput from './text_input'
|
||||
|
||||
export default {
|
||||
name: 'toggler',
|
||||
|
Reference in New Issue
Block a user