Skip to content

Commit

Permalink
perf(dropdown): get option value judgment logic
Browse files Browse the repository at this point in the history
  • Loading branch information
betavs committed Aug 24, 2024
1 parent 38724a9 commit 00e4a42
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 @@ -827,7 +827,7 @@ export const Dropdown = React.memo(
const getOptionValue = (option) => {
const optionValue = props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option ? option['value'] : ObjectUtils.resolveFieldData(option, 'value');

return ObjectUtils.isNotEmpty(optionValue) ? optionValue : option;
return optionValue ?? option;
};

const getOptionRenderKey = (option) => {
Expand Down

0 comments on commit 00e4a42

Please sign in to comment.