Skip to content

Commit

Permalink
Fix #6316: fixed issue on selecting option by key event when using op…
Browse files Browse the repository at this point in the history
…tionValue prop (#6374)

* Fix #6316: fixed issue on selecting option by key event when using optionValue prop

* Update Dropdown.js

---------

Co-authored-by: Shubham Saurabh <[email protected]>
Co-authored-by: Melloware <[email protected]>
  • Loading branch information
3 people authored Apr 13, 2024
1 parent 0a3d4e7 commit 943b454
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/lib/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -863,11 +863,11 @@ export const Dropdown = React.memo(
};

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

const getOptionValue = (option) => {
return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option && option.value !== undefined ? option.value : option;
return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option;
};

const getOptionRenderKey = (option) => {
Expand Down

0 comments on commit 943b454

Please sign in to comment.