Bind other input value properly and clear it when checkbox is toggled

This commit is contained in:
Montana
2019-01-04 10:59:12 -05:00
parent 62ac2642ae
commit 2743bddf0c
2 changed files with 5 additions and 3 deletions

View File

@@ -31,7 +31,8 @@ export default {
showError: showError,
showValid: !showError && !!this.initialValue,
validationError: this.initialErrors.join(' '),
otherChecked: this.initialValue.includes("other") ? true : this.otherChecked
otherChecked: this.initialValue.includes("other") ? true : this.otherChecked,
otherText: this.initialOtherValue
}
},
@@ -54,6 +55,7 @@ export default {
},
otherToggle: function() {
this.otherChecked = !this.otherChecked
this.otherText = ''
}
}
}