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 f40ce3d1aa
commit d1e1a2a36a

View File

@ -34,6 +34,18 @@ export default {
this.validateForm()
},
handleChildFieldChange: function(event) {
// need to temporarily use this function because we will no longer be passing
// parent_uid or watch from the child components
const { value, name, valid } = event
if (typeof this.fields[name] !== undefined) {
this.fields[name] = valid
this.changed = true
}
this.validateForm()
},
handleFieldMount: function(event) {
const { name, optional, valid } = event
this.fields[name] = optional || valid