primefaces / community

Community Forum
0 stars 0 forks source link

Empty value ("") for option in Dropdown components makes selected option label blank #1640

Open ethernidee opened 5 months ago

ethernidee commented 5 months ago

Discussed in https://github.com/orgs/primefaces/discussions/1639

Version: 4.0.0 beta

Originally posted by **ethernidee** April 10, 2024 Given options [{ value: '', label: "Private" }, { value: "123", label: "Public" } ] for Dropdown component. ``` ``` ![dropdown](https://github.com/primefaces/community/assets/1126218/04a572dd-9ba7-46fb-9872-1e7bf0b12900) Anytime user selects option with empty value, the value label is rendered as empty text, which is invalid. Opening dropdowns show valid option label in the list, but selected option caption will always be blank.