Skip to content

Commit

Permalink
Fix primefaces#6858: Make getOptionLabel function on the Dropdown com…
Browse files Browse the repository at this point in the history
…ponent always return a string
  • Loading branch information
VytautasLozickas committed Jul 11, 2024
1 parent 0ad8ab9 commit 6944df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ export const Dropdown = React.memo(
const getOptionLabel = (option) => {
const optionLabel = props.optionLabel ? ObjectUtils.resolveFieldData(option, props.optionLabel) : option ? option['label'] : ObjectUtils.resolveFieldData(option, 'label');

return ObjectUtils.isNotEmpty(optionLabel) ? optionLabel : option;
return `${optionLabel}`;
};

const getOptionValue = (option) => {
Expand Down

0 comments on commit 6944df2

Please sign in to comment.