react-currency-input-field
react-currency-input-field copied to clipboard
Backspace key doesn't work if input's length meets `maxLength` prop
Describe the bug
When total length of integer part and the decimal part is greater than maxLength
, Backspace key doesn't work
To Reproduce Steps to reproduce the behavior:
- Set both
maxLength
anddecimalScale
<CurrencyInputField maxLength={6} decimalScale={2} />
- Typing numbers until it meets the
maxLength
- Blur and the number is be formatted
- Focus again and Backspace doesn't work
Expected behavior The number could be modified by Backspace key
Code Sandbox https://codesandbox.io/p/sandbox/thirsty-yonath-sh6lzn?file=%2Fsrc%2FApp.js