I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-nacikz
Current behavior
Adding empty string as the label causes the label is not blank, but contains text 'empty'.
Workaround - add one space to the label, but it requires additional styling - dropdown collapses with selected empty item.
Expected behavior
The label is blank.
Minimal reproduction of the problem with instructions
Add an select item with blank label to dropdown options. {label: '', value: null}
What is the motivation / use case for changing the behavior?
Not correct behavior, worked correctly in version 9. This bug has been already solved in https://github.com/primefaces/primeng/issues/3964, but comes back again.
Angular version: 5.X
Angular 11
PrimeNG version: 5.X
PNG 11.1.0-rc.1
Stumbled over the same problem in PrimeNG 11 when using a dropdown for a filter column. The "empty" string is even misleading in this case (it should be "any" instead), and looks also out of place in other languages than English because it is hardcoded and not translated.
My workaround for showing an empty dropdown is using the non-breakable space \xa0 for the empty label. This avoids the collapsing dropdown mentioned by @anaq1.
This bug is still present as of PrimeNG 11.2.0.
I faced this issue when updated from v10 to v11
Note that if you added a {label: '', value: null} option to prevent automatic selection of the first value, you may use [autoDisplayFirst]="false" instead.
This has been open for quite some time, has there been any update or resolution? It seems incorrect to display "empty" in these cases
Most helpful comment
Stumbled over the same problem in PrimeNG 11 when using a dropdown for a filter column. The "empty" string is even misleading in this case (it should be "any" instead), and looks also out of place in other languages than English because it is hardcoded and not translated.
My workaround for showing an empty dropdown is using the non-breakable space
\xa0for the empty label. This avoids the collapsing dropdown mentioned by @anaq1.