Skip to content

Commit

Permalink
Fix #6858: Make getOptionLabel function on the Dropdown component alw…
Browse files Browse the repository at this point in the history
…ays return a string (#6871)
  • Loading branch information
VytautasLozickas authored Jul 11, 2024
1 parent d4016d0 commit 6b296b5
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 6b296b5

Please sign in to comment.