diff --git a/js/components/checkbox_input.js b/js/components/checkbox_input.js index bfea50ad..d4dc3397 100644 --- a/js/components/checkbox_input.js +++ b/js/components/checkbox_input.js @@ -10,6 +10,7 @@ export default { this.$root.$emit('field-change', { value: e.target.checked, name: this.name, + parent_uid: this.$parent._uid, }) }, }, diff --git a/js/components/date_selector.js b/js/components/date_selector.js index be6a8c89..d3d6ff56 100644 --- a/js/components/date_selector.js +++ b/js/components/date_selector.js @@ -135,7 +135,11 @@ export default { methods: { _emitChange: function(name, value, valid) { - this.$root.$emit('field-change', { value, valid, name }) + this.$root.$emit('field-change', { + value, + name, + parent_uid: this.$parent && this.$parent._uid, + }) }, }, diff --git a/js/components/multi_checkbox_input.js b/js/components/multi_checkbox_input.js index cf008326..2bf03e07 100644 --- a/js/components/multi_checkbox_input.js +++ b/js/components/multi_checkbox_input.js @@ -43,6 +43,7 @@ export default { this.$root.$emit('field-change', { value: e.target.value, name: this.name, + parent_uid: this.$parent._uid, }) this.showError = false this.showValid = true diff --git a/js/components/options_input.js b/js/components/options_input.js index 0a291b02..6f60d529 100644 --- a/js/components/options_input.js +++ b/js/components/options_input.js @@ -24,6 +24,7 @@ export default { this.$root.$emit('field-change', { value: e.target.value, name: this.name, + parent_uid: this.$parent._uid, }) this.showError = false this.showValid = true diff --git a/js/components/text_input.js b/js/components/text_input.js index cb838025..93609841 100644 --- a/js/components/text_input.js +++ b/js/components/text_input.js @@ -128,6 +128,7 @@ export default { value: this._rawValue(value), valid, name: this.name, + parent_uid: this.$parent._uid, }) }, diff --git a/js/mixins/form.js b/js/mixins/form.js index 2bdf9fea..0839a1b9 100644 --- a/js/mixins/form.js +++ b/js/mixins/form.js @@ -10,7 +10,9 @@ export default { const { value, name } = event if (typeof this[name] !== undefined) { this[name] = value - this.disabled = false + if (event['parent_uid'] === this._uid) { + this.disabled = false + } } }, },