react-numeric-input
react-numeric-input copied to clipboard
Not compatible with React 16.4?
When I click on up/down, it doesn't change the value. I need to hold it for longer before it works.
I traced the onClick and I see that on a single click, increase calls _step which calls this.setState without a callback defined, and then increase immediately reads this.state. However, the state hasn't yet changed by then, because setState can be asynchronous.
To solve this, I propose that _step returns the new value and the caller is responsible for calling setState.
Actually, it seems to be something different, because the this.state.value test is only used to know if it should add the repeat function.
So, no idea what's going on - adding mobile={false} doesn't help, and it's happening in Chrome and FireFox