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

Abreviations Break Input for Sweedish Locale

Open N104 opened this issue 3 years ago • 0 comments
trafficstars

NaN or sets of "000" appear in input field when using Sweeish locale with SEK currency and abbreviations enabled. Component is seeing the "k" in the currency label "kr", thinks it means "thousand", and is trying to replace it with "000".

To Reproduce

  1. Have a <CurrencyInput /> component with intlConfig={{ locale: "sv-SE", currency: "SEK" }} and disableAbbreviations={false}
  2. Type "75"
  3. The input field value becomes "NaN kr"

Expected behavior The input field value should be "75 kr"

CodeSandbox

N104 avatar Jun 22 '22 03:06 N104