Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect dot handler for input with decimalScale=0 #375

Closed
sergei97k opened this issue Nov 30, 2019 · 0 comments · Fixed by #376
Closed

Incorrect dot handler for input with decimalScale=0 #375

sergei97k opened this issue Nov 30, 2019 · 0 comments · Fixed by #376

Comments

@sergei97k
Copy link
Contributor

Hi, thank you for your library. It looks cool.

I found the problem when I created the component with the property decimalScale.
Steps to reproduce:

  1. Create the NumberFormat component with next props:
<NumberFormat 
     value={4200} 
     thousandSeparator={true}
     decimalScale={0}
/>
  1. Try to press or paste the dot symbol between zeros
  2. Last zero symbol was removed

You can see my example here

P.S. I resolved this issue. I added the property decimalSeparator={null}. But I'm not sure, that it's the clear solution (because decimalSeparator should get only "string" type).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant