Skip to content
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

type of InputNumberInputEvent.value is "number | string", cause it can be string when there is nothing accept "-" (minus sign) #15076

Closed
cetincakiroglu opened this issue Mar 19, 2024 · 0 comments · Fixed by #15077
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@cetincakiroglu
Copy link
Contributor

          @cetincakiroglu Hey, actually type of` InputNumberInputEvent.value` is `"number | string"`, cause it can be string when there is nothing accept "-" (minus sign)
image

Would be good to make the type InputNumberInputEvent with generics, so it would know that if p-inputNumber value can be negative then InputNumberInputEvent.value would be "number | string", if p-inputNumber would accept only positive numbers (like when [min]=0) then InputNumberInputEvent.value is indeed "number"

Originally posted by @Maksym-Onyshchenko in #14831 (comment)

@cetincakiroglu cetincakiroglu added this to the 17.12.0 milestone Mar 19, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 19, 2024
cetincakiroglu added a commit that referenced this issue Mar 19, 2024
Fixed #15076 - Update inputNumber event value type
@cetincakiroglu cetincakiroglu added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant