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

InputNumber: When used with Reactive Forms and an empty value, it does not have an empty value #14845

Closed
codrut1 opened this issue Feb 20, 2024 · 1 comment
Assignees
Labels
Resolution: Invalid Issue or pull request is not valid in the latest version

Comments

@codrut1
Copy link

codrut1 commented Feb 20, 2024

Describe the bug

I want to use p-inputNumber and have the initial value empty, I use it in a react form and the initial control value is ''. I expected the initial value to be empty, not 0

Environment

VS Code, Windows 10

Reproducer

https://stackblitz.com/edit/stackblitz-starters-5qaygy?file=src%2Fapp%2Fapp.component.html

Angular version

17.0.0

PrimeNG version

17.6.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.16.0

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Add reactive forms and p-inputNumber, with the control value set as ''
  2. Make sure that [allowEmpty] is true on the input

Expected behavior

I expect that the input will initially be empty, not display 0

@codrut1 codrut1 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 20, 2024
@mehmetcetin01140 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
@mehmetcetin01140 mehmetcetin01140 added this to the 17.10.0 milestone Feb 26, 2024
mehmetcetin01140 added a commit that referenced this issue Mar 1, 2024
…ty value, it does not have an empty value
@mehmetcetin01140 mehmetcetin01140 self-assigned this Mar 1, 2024
@cetincakiroglu
Copy link
Contributor

You're not even using reactive form in the example. There isn't a bug, please see the example: https://stackblitz.com/edit/fmccwf?file=src%2Fapp%2Fdemo%2Finput-number-reactive-forms-demo.ts,src%2Fapp%2Fdemo%2Finput-number-reactive-forms-demo.html

@cetincakiroglu cetincakiroglu added Resolution: Invalid Issue or pull request is not valid in the latest version and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Mar 7, 2024
@cetincakiroglu cetincakiroglu removed this from the 17.10.0 milestone Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Invalid Issue or pull request is not valid in the latest version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants