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
I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
(Notice, linked code sandbox is listed as an example on official documentation)
Choose USD. If there is a value, highlight the entire field by double clicking.
Try to type in "10.25"
Notice "$10.00.2" appears, then on blur, we are left with "10.00"
There is some issue when user types 0 or tries to add decimals.
What is expected?
User should be able to type in a currency amount with decimals properly. In this case, user can't type after the decimal properly. It seems the component is re-rendering way more often than the 3.26.17 version. In the previous version, the component only re-rendered & reformatted the result after the user blurred the input. Now, the component is updating the value with every keystroke, making it very difficult to handle decimals -- even for the given example application. It should instead only re-format after the user blurs.
What is actually happening?
There is some issue when user types 0. The elements re-renders too often; It should really only update the decimal after the user blurs.
Environment
Info
antd
4.17.0
React
^16.13.1, latest
System
Mac/Windows, *
Browser
Chrome, *
After updating from ^3.26.17, we found our Input formatter no longer functioned properly for prices. I came here to see documentation on the update, and found even the antd example contains the same problem.
The text was updated successfully, but these errors were encountered:
Reproduction link
Steps to reproduce
(Notice, linked code sandbox is listed as an example on official documentation)
What is expected?
User should be able to type in a currency amount with decimals properly. In this case, user can't type after the decimal properly. It seems the component is re-rendering way more often than the 3.26.17 version. In the previous version, the component only re-rendered & reformatted the result after the user blurred the input. Now, the component is updating the value with every keystroke, making it very difficult to handle decimals -- even for the given example application. It should instead only re-format after the user blurs.
What is actually happening?
There is some issue when user types 0. The elements re-renders too often; It should really only update the decimal after the user blurs.
After updating from ^3.26.17, we found our Input formatter no longer functioned properly for prices. I came here to see documentation on the update, and found even the antd example contains the same problem.
The text was updated successfully, but these errors were encountered: