question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

decimalSeparator does not seem to update with the new value

See original GitHub issue

Hello!

First of all, thank you for a really great product. Keep up the good work. This saved my behind some time 😃

I live in Sweden and I’m trying to number format a couple of numbers according to Swedish standard. It all works fine, until the decimalSeparator disapears for no good reason once a new value is updated from the state. I’ve tried this with and without a customInput and I get the same result.

<NumberFormat value={this.state.value} thousandSeparator=" " decimalSeparator="," suffix={' kr'} /> Note that the first render is OK, it’s when the state.value is updated, where the problem appears.

Can you please advice?

Thank you in advance!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
s-yadavcommented, Nov 11, 2017

This was probably because of incorrect documentation. Fixed it.

0reactions
s-yadavcommented, Nov 11, 2017

Also check if you making state to a string ‘3.59’ . If thats the case you have to pass isNumericString = {true}.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DecimalSeparator in PrimeNG Spinner does not work
I was going through the source code of Spinner and found this... Object.defineProperty(Spinner.prototype, "decimalSeparator", { set: function ( ...
Read more >
Decimal Separator of Decimal Pad d… - Apple Developer
I am trying to find out which decimal separator is used by the decimal pad keyboard in iOS, so I can convert strings...
Read more >
Wrong DecimalSeparator on RadNumericTextBox - Telerik
Hi Marc, When no DecimalSeparator is set, the value is get from the culture settings. It will work for all clients depending on...
Read more >
decimal seperator change from NL (,) to EN (.)
This seems to be a bug in the CDS / CRM connectors that is ignoring the decimal separator in numeric input for languages...
Read more >
Solved: Decimal separator missing when importing data
However when I do so for the current file (Locale), and update the query, ... what worked for me was to consult the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found