Update TO form and nested components to emit directly to parent components instead of emitting from the root component

This commit is contained in:
leigh-mil
2019-11-07 15:02:20 -05:00
parent 92ce3420b6
commit c94570f83e
14 changed files with 131 additions and 79 deletions

View File

@@ -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
},
},
}