Move formatting into onBlur
This commit is contained in:
parent
5f30b347c7
commit
c70d928b9a
@ -79,14 +79,15 @@ export default {
|
|||||||
onChange: function(e) {
|
onChange: function(e) {
|
||||||
// Only invalidate the field when it blurs
|
// Only invalidate the field when it blurs
|
||||||
this._checkIfValid({ value: e.target.value, invalidate: true })
|
this._checkIfValid({ value: e.target.value, invalidate: true })
|
||||||
if (this.validation === 'dollars') {
|
|
||||||
this.value = formatDollars(this._rawValue(e.target.value))
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onBlur: function(e) {
|
onBlur: function(e) {
|
||||||
this._checkIfValid({ value: e.target.value.trim(), invalidate: true })
|
this._checkIfValid({ value: e.target.value.trim(), invalidate: true })
|
||||||
this.value = e.target.value.trim()
|
this.value = e.target.value.trim()
|
||||||
|
|
||||||
|
if (this.validation === 'dollars') {
|
||||||
|
this.value = formatDollars(this._rawValue(e.target.value))
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user