melfore / mosaic

@melfore/mosaic is a free, open source, TypeScript ReactJS library that wraps @mui/* components offering a lightweight and simplified usage of Material UI.
https://melfore.github.io/mosaic/
MIT License
9 stars 1 forks source link

[InputNumber] Can't type negative numbers directly #411

Open Alberto1Rigamonti opened 5 months ago

Alberto1Rigamonti commented 5 months ago

Description

It is not possible to type negative numbers directly. For example, when I need to enter the number -12, the character - is not allowed, resulting in the entry of 12.

Current Behavior

To obtain a negative number, arrow keys or respective buttons must be used to manually decrease the value below 0. Only then can the number be edited to the desired negative value.

Expected Behavior

It should be possible to type a negative number directly using the keyboard.

melfore-devops commented 4 months ago

This is not possible with current implementation of Input component provided by @mui. A possible solution could be using https://mui.com/base-ui/react-number-input/ but it is still marked as Unstable and not included in @mui/material (currently in @mui/base)