Skip to content

Commit

Permalink
Fix #2601: CascadeSelect label using optionValue (#2790)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Apr 22, 2022
1 parent 90f433c commit 8f57403
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/lib/cascadeselect/CascadeSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export const CascadeSelect = React.memo(React.forwardRef((props, ref) => {
}

const getOptionLabel = (option) => {
return props.optionLabel ? ObjectUtils.resolveFieldData(option, props.optionLabel) : option;
const label = props.optionLabel ? ObjectUtils.resolveFieldData(option, props.optionLabel) : option;
return label || option;
}

const getOptionValue = (option) => {
Expand Down

0 comments on commit 8f57403

Please sign in to comment.