We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4def6af commit ebdc73eCopy full SHA for ebdc73e
src/InputSpinner.js
@@ -53,6 +53,9 @@ class InputSpinner extends Component {
53
this._setStateMin.bind(this),
54
this.props.typingTime,
55
);
56
+ this._updateValue = debounce((value) => {
57
+ this.setState({value: value});
58
+ }, 250);
59
60
this.state = {
61
min: min,
@@ -74,7 +77,7 @@ class InputSpinner extends Component {
74
77
if (this.props.value !== prevProps.value) {
75
78
let newValue = this.parseNum(this.props.value);
76
79
newValue = this.withinRange(newValue);
- this.setState({value: newValue});
80
+ this._updateValue(newValue);
81
}
82
// Parse Min
83
if (this.props.min !== prevProps.min) {
0 commit comments