Skip to content

Commit

Permalink
fix(rangecontrol): fixes an infinite update loop (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
2xAA authored Oct 31, 2021
1 parent 1178273 commit 334e024
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Controls/RangeControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
:step="step"
@keypress.enter="toggleEditMode"
@click.right="toggleEditMode"
@input="numberInputHandler"
v-show="editMode"
ref="input"
/>
Expand Down Expand Up @@ -297,6 +298,10 @@ export default {
requestAnimationFrame(this.draw);
},
numberInputHandler() {
this.$emit("input", this.inputValue);
},
toggleEditMode(e) {
e.preventDefault();
this.editMode = !this.editMode;
Expand Down Expand Up @@ -367,7 +372,6 @@ export default {
inputValue(value) {
this.position = -value * this.spacingCalc;
this.$emit("input", value);
}
}
};
Expand Down

0 comments on commit 334e024

Please sign in to comment.