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

Prefix/Suffix blocking input when set to a number #691

Closed
1 of 6 tasks
amanda-patterson-ny opened this issue Oct 18, 2022 · 3 comments
Closed
1 of 6 tasks

Prefix/Suffix blocking input when set to a number #691

amanda-patterson-ny opened this issue Oct 18, 2022 · 3 comments

Comments

@amanda-patterson-ny
Copy link

Describe the issue and the actual behavior

In NumericFormat, if the prefix or suffix is set to a number, that number is blocked from being input as the first input.
Ex. If prefix is set to '1', and the user types '1' as their input, nothing is shown. However, if the user types '2' as their input, '12' is shown, which is correct.

Describe the expected behavior

If the prefix is set to '1' and '1' is typed as input, what should be shown is '11'.

Provide a CodeSandbox link illustrating the issue

Issue is present in the demo in official documentation.
https://s-yadav.github.io/react-number-format/docs/numeric_format/#prefix-string
https://codesandbox.io/s/prefix-demo-6ibo72?from-embed=&file=/src/App.js

Provide steps to reproduce this issue

  1. Set prefix to '1'
  2. Type '1' as input
  3. Confirm that '1' is blocked from being input

Please check the browsers where the issue is seen

  • Chrome
  • Chrome (Android)
  • Safari (OSX)
  • Safari (iOS)
  • Firefox
  • Firefox (Android)

Have only tested in chrome.

@s-yadav
Copy link
Owner

s-yadav commented Oct 19, 2022

Seems like a bug. Will fix this.

@sergey-gorchichko
Copy link

@s-yadav any plans to fix it in nearest releases?

@s-yadav
Copy link
Owner

s-yadav commented Mar 5, 2023

Fixed on v5.1.4

@s-yadav s-yadav closed this as completed Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants