We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I have a problem where the state is not calculated correct for negative values
I have found that it is the following code in index.js that is the problem
initialValue = Number(initialValue).toLocaleString(undefined, { style : 'decimal', minimumFractionDigits: props.precision, maximumFractionDigits: props.precision })
The minus sign is change to "−" (2212 MINUS SIGN) instead of "-" (002D HYPHEN-MINUS)
This result in that the logic for the following line fails
let negativeSignCount = (value.match(/-/g) || []).length;
Because it is looking for "-" (002D HYPHEN-MINUS), and in my case where the char is "−" (2212 MINUS SIGN) negativeSignCount equals 0, instead of 1
The solution should be to change:
to
initialValue = Number(initialValue).toFixed(props.precision);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I have a problem where the state is not calculated correct for negative values
I have found that it is the following code in index.js that is the problem
The minus sign is change to "−" (2212 MINUS SIGN) instead of "-" (002D HYPHEN-MINUS)
This result in that the logic for the following line fails
Because it is looking for "-" (002D HYPHEN-MINUS), and in my case where the char is "−" (2212 MINUS SIGN) negativeSignCount equals 0, instead of 1
The solution should be to change:
to
The text was updated successfully, but these errors were encountered: