From b1ee67a8048e4c2e3ba7abcdd1941a4d157da36a Mon Sep 17 00:00:00 2001 From: Montana Date: Thu, 3 Jan 2019 14:28:38 -0500 Subject: [PATCH] If other is checked in previous save, expand text input --- js/components/multi_checkbox_input.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/components/multi_checkbox_input.js b/js/components/multi_checkbox_input.js index 1f41637b..9f821707 100644 --- a/js/components/multi_checkbox_input.js +++ b/js/components/multi_checkbox_input.js @@ -17,8 +17,10 @@ export default { type: Array, default: () => [] }, - initialValue: Array, - otherChecked: Boolean, + initialValue: { + type: Array, + default: () => [] + } }, @@ -28,10 +30,10 @@ export default { showError: showError, showValid: !showError && !!this.initialValue, validationError: this.initialErrors.join(' '), + otherChecked: this.initialValue.includes("other") ? true : this.otherChecked } }, - methods: { onInput: function (e) { this.$root.$emit('field-change', {