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

fixedDecimalLength causes value to be modified incorrectly

Open Felipe-noob opened this issue 3 years ago • 0 comments
trafficstars

Describe the bug the prop "fixedDecimalLength" causes the value to lose 2 digits on blur.

To Reproduce This is my code (simplified):

<CurrencyInput
value={money}
onValueChange={(value) => {
  setMoney(value)
}}
fixedDecimalLength="2"
/>

Expected behavior The value shouldn't change.

Additional context locale: 'en' Removing the fixedDecimalLength solves the problem

Felipe-noob avatar Aug 24 '22 13:08 Felipe-noob