Closed converter-user-old closed 2 years ago
Thanks for reporting!
Hi @rtivital, The problem is if a user deletes everything, text input sends "undefined". I added the default value to "formatNum". Right now if we delete everything it stays empty I don't know if this is correct behavior or not. Lmk if you want me to change anything.
https://github.com/mantinedev/mantine/pull/802 (i usually don't contribute so sorry if I did something wrong also thank you for this UI library it is really good)
Fixed in 3.6.7
What package has an issue
@mantine/core
Describe the bug
If you have a custom decimalSeparator and remove all numbers from the input, an error occurse
In which browser did the problem occur
All
If possible, please include a link to a codesandbox with the reproduced problem
https://mantine.dev/core/number-input/#decimal-separator
Do you know how to fix the issue
Yes
Are you willing to participate in fixing this issue and create a pull request with the fix
No
Possible fix
Add to the replace a ?: https://github.com/mantinedev/mantine/blob/62c1b7e00352731988160321b4369f2731668b28/src/mantine-core/src/components/NumberInput/NumberInput.tsx#L143
probably to this to: https://github.com/mantinedev/mantine/blob/62c1b7e00352731988160321b4369f2731668b28/src/mantine-core/src/components/NumberInput/NumberInput.tsx#L153