Skip to content

Commit

Permalink
Fix primefaces#7134:Dropdown can now has options with keys named value
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadbdeir committed Sep 9, 2024
1 parent 202b78e commit c7f3cfa
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 @@ -825,7 +825,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');
const optionValue = props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option ? option : ObjectUtils.resolveFieldData(option, 'value');

return props.optionValue || ObjectUtils.isNotEmpty(optionValue) ? optionValue : option;
};
Expand Down

0 comments on commit c7f3cfa

Please sign in to comment.