Fixed #1337 - input mask - mask affecting dirty state

pull/1478/head
mertsincan 2021-08-25 10:03:17 +03:00
parent a1cf1d4277
commit 023d7794ad
1 changed files with 7 additions and 5 deletions

View File

@ -392,11 +392,11 @@ export default {
let val = this.unmask ? this.getUnmaskedValue() : e.target.value;
this.$emit('update:modelValue', (this.defaultBuffer !== val) ? val : '');
},
updateValue() {
updateValue(updateModel = true) {
if (this.$el) {
if (this.modelValue == null) {
this.$el.value = '';
this.$emit('update:modelValue', '');
updateModel && this.$emit('update:modelValue', '');
}
else {
this.$el.value = this.modelValue;
@ -407,9 +407,11 @@ export default {
this.writeBuffer();
this.checkVal();
if (updateModel) {
let val = this.unmask ? this.getUnmaskedValue() : this.$el.value;
this.$emit('update:modelValue', (this.defaultBuffer !== val) ? val : '');
}
}
}, 10);
}
@ -468,7 +470,7 @@ export default {
}
}
this.defaultBuffer = this.buffer.join('');
this.updateValue();
this.updateValue(false);
},
updated() {
if (this.isValueUpdated()) {