You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functionality of onChange method has been changed. it now parses the value in the current input field and returns it to model. The value that comes to the model is the value that is not validated.
The onValueChange method is used to synchronize the model and component values. The value that comes to the model is the value that is validated. It is recommended to call this.setState({componentValue: e.value}) in this method.
The onValueChange method calls in two ways by the component;
Clicking outside to validate the change after changing something in inputNumber.
Changing the value using spinner's button/arrow keys
Pressing the 'enter' key
The text was updated successfully, but these errors were encountered:
InputNumberProps#value and ChangeParams#value are both still typed as number though. Shouldn't the former be string | number and the latter the same or just string? I would have checked but it's hard to do so currently because of #1768...
That's not how onChange actually works - it never shows intermediate string values such "1.". But if you have say max={10} and 10 in the field and type another 0 than onChange would be called with 100 (number). And also immediately after onValueChange would happen with 10. Unlike what the description here says about when onValueChange is supposed to be called. At least that's how it is in PR7.0.0. https://codesandbox.io/s/inputnumber-tests-joyoi?file=/src/demo/InputNumberDemo.js
This is strange. I'd understand exposing the unvalidated string value as is and a validated number. But showing half-validated number in onChange makes no sense.
The functionality of onChange method has been changed. it now parses the value in the current input field and returns it to model. The value that comes to the model is the value that is not validated.
The onValueChange method is used to synchronize the model and component values. The value that comes to the model is the value that is validated. It is recommended to call this.setState({componentValue: e.value}) in this method.
The onValueChange method calls in two ways by the component;
The text was updated successfully, but these errors were encountered: