From a032800ed1ee8bab668774b7ee0ff8200cc083b1 Mon Sep 17 00:00:00 2001 From: Montana Date: Wed, 9 Jan 2019 14:45:37 -0500 Subject: [PATCH] Only persist otherText if the page has not been submitted --- js/components/multi_checkbox_input.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/components/multi_checkbox_input.js b/js/components/multi_checkbox_input.js index 6ab3e050..c5fc86e1 100644 --- a/js/components/multi_checkbox_input.js +++ b/js/components/multi_checkbox_input.js @@ -30,7 +30,7 @@ export default { showValid: !showError && this.initialValue.length > 0, validationError: this.initialErrors.join(' '), otherChecked: this.initialValue.includes("other") ? true : this.otherChecked, - otherText: this.initialOtherValue, + otherText: this.initialValue.includes("other") ? this.initialOtherValue : '', selections: this.initialValue } }, @@ -46,7 +46,6 @@ export default { }, otherToggle: function() { this.otherChecked = !this.otherChecked - this.otherText = '' }, } }