Skip to content

Commit

Permalink
fix(MultiSelect): fix phantom selection on MenuKeyDownEnter
Browse files Browse the repository at this point in the history
  • Loading branch information
dakahn committed Sep 29, 2021
1 parent d4b4772 commit 92308db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react/src/components/MultiSelect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ const MultiSelect = React.forwardRef(function MultiSelect(
case ItemClick:
case MenuKeyDownSpaceButton:
case MenuKeyDownEnter:
if (changes.selectedItems === undefined) {
break;
}
onItemChange(changes.selectedItem);
break;
case MenuKeyDownArrowDown:
Expand Down

0 comments on commit 92308db

Please sign in to comment.