primefaces/community

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

ethernidee opened this issue · 0 comments

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
  ...
  option-label="label"
  option-value="value"
</Dropdown>

dropdown

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.