Dropdown: placeholder isn't shown when having null as a selectable option #15308
Labels
Status: Discussion
Issue or pull request needs to be discussed by Core Team
Status: Pending Review
Issue or pull request is being reviewed by Core Team
Milestone
Describe the bug
When adding null as a selectable option, the placeholder isn't shown on load, when selecting the null value (the 'empty' option) or when clearing the dropdown. In my example, the values are objects of type { label: 'label', value: 'value' } with the optionLabel and optionValue params set on the p-dropdown component. The null value is set as { label: null, value: null }.
Environment
I use a windows 11 laptop with IntelliJ. Angular 17.3.4, PrimeNG 17.13.0 and node v18.20.1.
Reproducer
https://stackblitz.com/edit/github-bjxtkz?file=src%2Fapp%2Fapp.component.html
Angular version
17.3.4
PrimeNG version
17.13.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
v18.20.1
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
the dropdowns value should be the placeholder when loaded, cleared or empty is selected.
The text was updated successfully, but these errors were encountered: