react-currency-input-field icon indicating copy to clipboard operation
react-currency-input-field copied to clipboard

Backspace key doesn't work if input's length meets `maxLength` prop

Open andysongs opened this issue 6 months ago • 0 comments

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:

  1. Set both maxLength and decimalScale
<CurrencyInputField maxLength={6} decimalScale={2} />
  1. Typing numbers until it meets the maxLength image
  2. Blur and the number is be formatted image
  3. Focus again and Backspace doesn't work image

Expected behavior The number could be modified by Backspace key

Code Sandbox https://codesandbox.io/p/sandbox/thirsty-yonath-sh6lzn?file=%2Fsrc%2FApp.js

andysongs avatar Aug 21 '24 14:08 andysongs