React-number-format: allowDecimalSeparators does't always work correctly when paste a number into the input

Created on 2 Oct 2019  路  6Comments  路  Source: s-yadav/react-number-format

allowedDecimalSeparators={[",", "."]}

decimalSeparator='.'
1) paste '11.11', result '11.11';
2) paste '11,11', result '1 111'

decimalSeparator=','
1) paste '11.11', result '1 111';
2) paste '11,11', result '11,11'

https://codesandbox.io/s/react-number-format-demo-f7245

Most helpful comment

i have same issue

All 6 comments

i have same issue

Hi. Same issue here...:/

Hi, @s-yadav
This problem is still relevant today

@tenkij thank for your code-pen i had fixed the issue. Love you 3000

Hi @s-yadav,
Same problem here ;)

I'm not very sure but i think maybe it's forcing formatting the value since it's a number greater than a thousand. By default if thousandSeparator prop it's not present it shouldn't force formatting, but it's a posibility.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

havantuan picture havantuan  路  7Comments

leonardojobim picture leonardojobim  路  3Comments

fedulovivan picture fedulovivan  路  6Comments

bernatfortet picture bernatfortet  路  3Comments

sezarthiago picture sezarthiago  路  7Comments