-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
p-inputNumber: Emits number while changing but string when losing focus #15039
Comments
Hello, I have the same problem, let's hope they fix it in version 17.11.0 |
I'm also experiencing this issue. This seems to be introduced in 17.9.0, as far as I can tell by this change: 82a4050#diff-d15eb5f971fcc845ef140641bb6498419d87b06832dd22180381101c84f55a70R1369 |
That could also explain, why I keep seeing this Error in my console when emptying the input field: |
The issue seems to be resolved in PrimeNG 17.11.0: https://stackblitz.com/edit/m96pfg-zf4xhr?file=src%2Fapp%2Fdemo%2Finput-number-numerals-demo.ts |
This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding! |
Describe the bug
When changing the content of a p-inputNumber, the emitted value correctly is of type
number
. But as soon as the input loses focus the type changes tostring
, which may lead too hard to find typing problems.Environment
Any environment should have this problem. I tested this with the documentation demo StackBlitz (see below).
Reproducer
https://stackblitz.com/edit/m96pfg?file=src%2Fapp%2Fdemo%2Finput-number-numerals-demo.html
Angular version
17.2.2
PrimeNG version
17.10.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
n/a
Browser(s)
Chrome
Steps to reproduce the behavior
In my StackBlitz, change the values of the input fields and see the output below:
Expected behavior
The emitted type is always number (and maybe undefined/null, if input is empty).
The text was updated successfully, but these errors were encountered: