Merge pull request #707 from dod-ccpo/clin-trailing-zeros-fix

Move formatting into onBlur
This commit is contained in:
leigh-mil
2019-03-15 10:06:48 -04:00
committed by GitHub

View File

@@ -79,14 +79,15 @@ export default {
onChange: function(e) {
// Only invalidate the field when it blurs
this._checkIfValid({ value: e.target.value, invalidate: true })
if (this.validation === 'dollars') {
this.value = formatDollars(this._rawValue(e.target.value))
}
},
onBlur: function(e) {
this._checkIfValid({ value: e.target.value.trim(), invalidate: true })
this.value = e.target.value.trim()
if (this.validation === 'dollars') {
this.value = formatDollars(this._rawValue(e.target.value))
}
},
//