design-system
design-system copied to clipboard
Decimal numbers formatted with comma as decimal separator fail ...
Bug report
Required System information
- Node.js version: 14.19.3
- NPM version: 6-14-17
- Strapi version: 4.1.12
- Database: Mysql
- Operating system: Ubuntu
Describe the bug
I've a numeric field for a price, decimal 2.22 I use the Spanish locale where the comma is the decimal separator, I've tried it with different browsers, operating systems and computers, and the same thing happens everywhere. When you enter a number with decimals an erratic behavior is generated, as it shows points then commas, then deletes them, etc. a chaos. Better watch the video to have a good idea...
Steps to reproduce the behavior
- Add a numeric field
- Supose that set your regional configuration as Spain,
- Fill the field with numbers
- Enjoy the error
Expected behavior
Use always same decimal separator as the regional config ... and don't change the value multipling it for 100
Screenshots
https://user-images.githubusercontent.com/631200/178746215-e2f16e43-8f80-469c-a4a2-b7720d46659a.mov
Hi, @gu-stav
Not sure why this issue has been moved here? from my point of view this is a bug affecting the Admin Panel
@spenya I believe the issue starts at the NumberInput
design-system component.
@spenya I believe the issue starts at the
NumberInput
design-system component.
Thanks for the response ! I'm new to strapi ...