Fixed #950 - Error when removing InputNumbers from DOM tree

pull/1021/head
Cagatay Civici 2021-02-17 18:17:49 +03:00
parent 49f33df9cd
commit 19f4fe0ed2
1 changed files with 10 additions and 8 deletions

View File

@ -297,14 +297,16 @@ export default {
this.spin(event, dir);
},
spin(event, dir) {
let step = this.step * dir;
let currentValue = this.parseValue(this.$refs.input.$el.value) || 0;
let newValue = this.validateValue(currentValue + step);
if (this.$refs.input) {
let step = this.step * dir;
let currentValue = this.parseValue(this.$refs.input.$el.value) || 0;
let newValue = this.validateValue(currentValue + step);
this.updateInput(newValue, null, 'spin');
this.updateModel(event, newValue);
this.updateInput(newValue, null, 'spin');
this.updateModel(event, newValue);
this.handleOnInput(event, currentValue, newValue);
this.handleOnInput(event, currentValue, newValue);
}
},
onUpButtonMouseDown(event) {
if (!this.$attrs.disabled) {