Only persist otherText if the page has not been submitted

This commit is contained in:
Montana 2019-01-09 14:45:37 -05:00
parent 5861c7bd42
commit a032800ed1

View File

@ -30,7 +30,7 @@ export default {
showValid: !showError && this.initialValue.length > 0, showValid: !showError && this.initialValue.length > 0,
validationError: this.initialErrors.join(' '), validationError: this.initialErrors.join(' '),
otherChecked: this.initialValue.includes("other") ? true : this.otherChecked, otherChecked: this.initialValue.includes("other") ? true : this.otherChecked,
otherText: this.initialOtherValue, otherText: this.initialValue.includes("other") ? this.initialOtherValue : '',
selections: this.initialValue selections: this.initialValue
} }
}, },
@ -46,7 +46,6 @@ export default {
}, },
otherToggle: function() { otherToggle: function() {
this.otherChecked = !this.otherChecked this.otherChecked = !this.otherChecked
this.otherText = ''
}, },
} }
} }