Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumericInput regression prevents typing decimal places #4320

Closed
adidahiya opened this issue Sep 8, 2020 · 1 comment · Fixed by #4323 or #4326
Closed

NumericInput regression prevents typing decimal places #4320

adidahiya opened this issue Sep 8, 2020 · 1 comment · Fixed by #4323 or #4326

Comments

@adidahiya
Copy link
Contributor

adidahiya commented Sep 8, 2020

Environment

  • Package version(s): core 3.30.0

Code Sandbox

Link to a minimal repro (fork this code sandbox): https://codesandbox.io/s/nice-bartik-3ku3b?file=/src/App.js

Steps to reproduce

  1. Type . at the end of input

Actual behavior

Nothing, keystroke is not registered

Expected behavior

Keystroke is registered and 0. is shown in the input

Possible solution

This regression was caused by #4211, so we need to look there for solutions

@adidahiya
Copy link
Contributor Author

Actually, nevermind -- this is an intended change with the fixes made to controlled usage of NumericInput in #4211. The new behavior is correct, but consumers may have been relying on buggy behavior of the component before that change. The recommendation is that controlled usage should always use the second parameter of onChange, taking the value as a string, rather than as a parsed number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment