Fixed #633 - InputNumber's onInputBlur fails when component gets destroyed

pull/682/head
Cagatay Civici 2020-11-25 15:44:10 +03:00
parent 27736c8ce7
commit e02f55ef5b
1 changed files with 6 additions and 4 deletions

View File

@ -798,10 +798,12 @@ export default {
onInputBlur() { onInputBlur() {
this.focused = false; this.focused = false;
let newValue = this.validateValue(this.parseValue(this.$refs.input.$el.value)); if (this.$refs && this.$refs.input) {
this.$refs.input.$el.value = this.formatValue(newValue); let newValue = this.validateValue(this.parseValue(this.$refs.input.$el.value));
this.$refs.input.$el.setAttribute('aria-valuenow', newValue); this.$refs.input.$el.value = this.formatValue(newValue);
this.updateModel(event, newValue); this.$refs.input.$el.setAttribute('aria-valuenow', newValue);
this.updateModel(event, newValue);
}
}, },
clearTimer() { clearTimer() {
if (this.timer) { if (this.timer) {