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 - showClear icon not showing when value is "0" #13525

Closed
zygarios opened this issue Aug 21, 2023 · 0 comments · Fixed by #13555
Closed

InputNumber - showClear icon not showing when value is "0" #13525

zygarios opened this issue Aug 21, 2023 · 0 comments · Fixed by #13555
Labels
LTS-PORTABLE Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@zygarios
Copy link

Describe the feature you would like to see added

Show clear icon in InputNumber when [showIcon] flag is set.

Is your feature request related to a problem?

A very problematic issue is that the InputNumber doesn't display the clear value icon when the value is 0, treating it as false.

Describe the solution you'd like

https://github.com/primefaces/primeng/blob/5acdd3454eccb17e89d8c71c017cdf9d62a93e5b/src/app/components/inputnumber/inputnumber.ts#L88C50-L88C50

Solution is simple - change condition in that line to:
buttonLayout != 'vertical' && showClear && (value || value === 0)

Describe alternatives you have considered

No response

Additional context

No response

@zygarios zygarios added Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request labels Aug 21, 2023
dylansyoung added a commit to dylansyoung/primeng that referenced this issue Aug 28, 2023
@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Type: New Feature Issue contains a new feature or new component request Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 29, 2023
@mertsincan mertsincan linked a pull request Aug 29, 2023 that will close this issue
mertsincan pushed a commit that referenced this issue Aug 29, 2023
* issue #13525 inputNumber not showing clear when 0

* run npm run format fix
@mertsincan mertsincan added this to the 16.2.1 milestone Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE 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.

3 participants