dont mutate prop directly
This commit is contained in:
parent
526b6c7653
commit
375bdc52b8
@ -24,7 +24,8 @@ export default {
|
|||||||
valid: false,
|
valid: false,
|
||||||
showError: false,
|
showError: false,
|
||||||
showValid: false,
|
showValid: false,
|
||||||
mask: inputValidations[this.validation].mask
|
mask: inputValidations[this.validation].mask,
|
||||||
|
renderedValue: this.value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ export default {
|
|||||||
const value = this.$refs.input.value
|
const value = this.$refs.input.value
|
||||||
if (value) {
|
if (value) {
|
||||||
this._checkIfValid({ value, invalidate: true })
|
this._checkIfValid({ value, invalidate: true })
|
||||||
this.value = conformToMask(value, this.mask).conformedValue
|
this.renderedValue = conformToMask(value, this.mask).conformedValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
<masked-input
|
<masked-input
|
||||||
v-on:input='onInput'
|
v-on:input='onInput'
|
||||||
v-on:change='onChange'
|
v-on:change='onChange'
|
||||||
v-model='value'
|
v-model='renderedValue'
|
||||||
id='basic-text-1'
|
id='basic-text-1'
|
||||||
type='text'
|
type='text'
|
||||||
ref='input'
|
ref='input'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user