You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The InputNumber Component overwrites input with wrong values when the number gets too big (over 9999999999999998). Next Digit that is inputted gets increased by one. Subsequent inputs are replaced with 0. When input [format] is set to false it will at some point format to scientific notation and then 'Infinity'.
Occurs in both v16 and v17
mehmetcetin01140
added
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Feb 26, 2024
I believe there might not be a feasible solution to this issue because switching to BigInt as a replacement could potentially break the logic of other applications. This is because BigInts cannot be used interchangeably with regular Numbers, nor can they utilize functions from the Math object.
However, as a workaround, the number-input component could implement a validation check to ensure the input value does not exceed JavaScript's MAX_SAFE_INTEGER limit. By doing so, it can prevent the issue of overflow with the JS number primitive.
So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?
Thanks a lot for your understanding!
Best Regards,
Describe the bug
The InputNumber Component overwrites input with wrong values when the number gets too big (over 9999999999999998). Next Digit that is inputted gets increased by one. Subsequent inputs are replaced with 0. When input [format] is set to false it will at some point format to scientific notation and then 'Infinity'.
Occurs in both v16 and v17
Environment
Reproducer
https://stackblitz.com/edit/zuhepy?file=src%2Fapp%2Fdemo%2Finput-number-numerals-demo.html,src%2Fapp%2Fdemo%2Finput-number-numerals-demo.ts,package.json
Angular version
16.x | 17.x
PrimeNG version
16.x | 17.x
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.x
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
input value is not replaced
The text was updated successfully, but these errors were encountered: