diff --git a/js/mixins/form.js b/js/mixins/form.js index 87f5a044..59d7d2f5 100644 --- a/js/mixins/form.js +++ b/js/mixins/form.js @@ -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