react-numeric-input
react-numeric-input copied to clipboard
Incorrect behaviour on increase or decrease value in some cases
For example we have some React component with NumericInput:
class Foo extends React.Component {
constructor(props) {
this.state = {
value: 42
}
}
_onInputChangeHandler = (newValue) => {
// some business logic that processed more than 500ms
this.setState({value: newValue});
};
render() {
return (<NumericInput
value={this.state.value}
onChange={this._onInputChangeHandler}
/>);
}
}
Expected Value change once
Actual After click on Increment button, input changes several times, because timer didn`t stop and step was called several times