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
In NumericFormat, if using a suffix containing numbers, and you select/place the cursor at the end and type a number, the numbers in the suffix gets appended to the value. For example, using the suffix 000 USD denoting thousands of dollars, and a value of 1 resulting in the text 1 000 USD, you can select USD and type 1, which will result in the zeros getting appended to the value giving 10001 000 USD.
Additionally, if you instead try typing any non-numeric character, it will also append the zeros resulting in 1000 000 USD when the value should not change at all.
This also applies to prefixes when the order is reversed e.g. USD 000 .
Describe the expected behavior
In the above example the expected behaviour when typing a number like 1 would be that the value becomes 11, and that the text becomes 11 000 USD. Alternatively blocking the input entirely. When typing a non-numeric character, the expected behaviour is that the input is blocked.
This issue was not present in version 4.9.4, in this version the input was blocked in this case.
Describe the issue and the actual behavior
In NumericFormat, if using a suffix containing numbers, and you select/place the cursor at the end and type a number, the numbers in the suffix gets appended to the value. For example, using the suffix
000 USD
denoting thousands of dollars, and a value of1
resulting in the text1 000 USD
, you can selectUSD
and type 1, which will result in the zeros getting appended to the value giving10001 000 USD
.Additionally, if you instead try typing any non-numeric character, it will also append the zeros resulting in
1000 000 USD
when the value should not change at all.This also applies to prefixes when the order is reversed e.g.
USD 000
.Describe the expected behavior
In the above example the expected behaviour when typing a number like
1
would be that the value becomes11
, and that the text becomes11 000 USD
. Alternatively blocking the input entirely. When typing a non-numeric character, the expected behaviour is that the input is blocked.This issue was not present in version
4.9.4
, in this version the input was blocked in this case.Provide a CodeSandbox link illustrating the issue
https://codesandbox.io/s/suffix-issue-i0tlk7?file=/src/App.js
Provide steps to reproduce this issue
In the sandbox linked above:
USD
by double clicking.Please check the browsers where the issue is seen
The text was updated successfully, but these errors were encountered: