-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
dropdown: selected, disabled option not rendered #14716
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Comments
This was referenced Feb 8, 2024
Thanks for the quick fix. However there is a follow-up issue with 17.7 detailed in #14809 |
@cetincakiroglu |
Same here in v17.18.4 - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Describe the bug
When a dropdown has a disabled option that is initially selected by code, it is not rendered as the current selection.
It is a common use case that a dropdown has a current selection, that the user should change but to any value different than the currently selected one. Therefore the current/initial selected option gets disabled, so that it cannot be re-selected.
This used to be the case in Prime v15 and v16
Environment
see below
Reproducer
https://stackblitz.com/edit/github-npixcr?file=src%2Fapp%2Fapp.component.ts
Angular version
17.1.2
PrimeNG version
17.5.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18
Browser(s)
No response
Steps to reproduce the behavior
app.component.ts
two
is not rendered/selectedExpected behavior
The selected option should be rendered, since it is already the current selection via model binding, even if it is disabled.
The text was updated successfully, but these errors were encountered: