Update TO form and nested components to emit directly to parent components instead of emitting from the root component
This commit is contained in:
@@ -25,6 +25,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
onInput: function(e) {
|
||||
this.$parent.$emit('field-change')
|
||||
emitEvent('field-change', this, {
|
||||
value: e.target.checked,
|
||||
name: this.name,
|
||||
@@ -32,4 +33,10 @@ export default {
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
valid: function() {
|
||||
return this.optional || this.isChecked
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user