Skip to content

Commit

Permalink
Fixed primefaces#1001 - Error when removing InputNumbers from DOM tree
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici authored and fairking committed Feb 22, 2021
1 parent a82d1fa commit 10daa27
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/inputnumber/InputNumber.vue
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,14 @@ 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);
}
},
onUpButtonMouseDown(event) {
if (!this.$attrs.disabled) {
Expand Down

0 comments on commit 10daa27

Please sign in to comment.