-
Notifications
You must be signed in to change notification settings - Fork 301
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
Number cast bug #791
Comments
NepipenkoIgor
pushed a commit
that referenced
this issue
Nov 24, 2020
NepipenkoIgor
pushed a commit
that referenced
this issue
Nov 24, 2020
NepipenkoIgor
pushed a commit
that referenced
this issue
Nov 24, 2020
NepipenkoIgor
added a commit
that referenced
this issue
Nov 24, 2020
@eggp Thank you for using library. Please try version v11.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error details:
In this case, if you initialize FormControl with values of number type and 2 decimal places, the type of stored values changes to string. For this I created a patch in which we automatically detect the separatorLimit value and cast the Number.toFixed (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed return value type is string) to a number.
Demo stackblitz example
If we comment on lines 9-21 in the main.ts, the error occurs: in the first field a decimal value has to be deleted and the value stored in control becomes a string type. Putting the patch back on solves this.
The text was updated successfully, but these errors were encountered: