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

Weird behavior after clearing input #855

Closed
1 of 6 tasks
MartinWeb opened this issue Aug 30, 2024 · 1 comment
Closed
1 of 6 tasks

Weird behavior after clearing input #855

MartinWeb opened this issue Aug 30, 2024 · 1 comment

Comments

@MartinWeb
Copy link

MartinWeb commented Aug 30, 2024

Describe the issue and the actual behavior

When we clear a NumericFormat input, either with the Suppr button directly by testing, either with the clear function of the userEvent of testing-library, a weird behavior appears with the last version, the 5.4.1.
This didn't use to happen with the 5.4.0.

After clearing the input, when we start typing, the first number are set as floating numbers, not as "positive" numbers like it used to.

Describe the expected behavior

Provide a CodeSandbox link illustrating the issue

Provide steps to reproduce this issue

  • Clear a input with the Delete button or a clear function inside a test environment (testing-library for example)
  • Type inside the input
  • Numbers appears as floating numbers

Here on the gif, i focused the input, Ctrl + A to select all, click Delete button, then type 3.21.
The 3 number appears, then disappear after clicking the .
firefox_p4Mse8jbLQ

I have these properties set on the NumericFormat component
decimalScale="2" decimalSeparator="," fixedDecimalScale allowNegative={false}

Please check the browsers where the issue is seen

  • Chrome
  • Chrome (Android)
  • Safari (OSX)
  • Safari (iOS)
  • Firefox
  • Firefox (Android)
@s-yadav
Copy link
Owner

s-yadav commented Sep 7, 2024

This is fixed on 5.4.2.

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

2 participants