Skip to content

Commit

Permalink
Fix primefaces#6058 Dropdown: Select value with Enter when optionValu…
Browse files Browse the repository at this point in the history
…e is set
  • Loading branch information
datacampsis committed May 29, 2024
1 parent 721563f commit c2bedb2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/lib/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,9 @@ export const Dropdown = React.memo(
};

const onOptionSelect = (event, option, isHide = true) => {
const value = getOptionValue(option);

selectItem({
originalEvent: event,
option: value
option
});

isHide && hide(true);
Expand Down Expand Up @@ -754,6 +752,7 @@ export const Dropdown = React.memo(
updateEditableLabel(event.option);
setFocusedOptionIndex(-1);
const optionValue = getOptionValue(event.option);

const selectedOptionIndex = findOptionIndexInList(event.option, visibleOptions);

if (props.onChange) {
Expand Down

0 comments on commit c2bedb2

Please sign in to comment.