Skip to content

Commit 6b296b5

Browse files
Fix #6858: Make getOptionLabel function on the Dropdown component always return a string (#6871)
1 parent d4016d0 commit 6b296b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/lib/dropdown/Dropdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ export const Dropdown = React.memo(
888888
const getOptionLabel = (option) => {
889889
const optionLabel = props.optionLabel ? ObjectUtils.resolveFieldData(option, props.optionLabel) : option ? option['label'] : ObjectUtils.resolveFieldData(option, 'label');
890890

891-
return ObjectUtils.isNotEmpty(optionLabel) ? optionLabel : option;
891+
return `${optionLabel}`;
892892
};
893893

894894
const getOptionValue = (option) => {

0 commit comments

Comments
 (0)