Skip to content

Commit

Permalink
fix(MultiSelect): fix phantom selection on MenuKeyDownEnter 👻 (#9765)
Browse files Browse the repository at this point in the history
* fix(MultiSelect): fix phantom selection on MenuKeyDownEnter

* fix(MultiSelect): fix phantom selection on MenuKeyDownEnter

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
dakahn and kodiakhq[bot] authored Oct 6, 2021
1 parent 3af8a94 commit 6e52398
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.selectedItem === undefined) {
break;
}
onItemChange(changes.selectedItem);
break;
case MenuKeyDownArrowDown:
Expand Down

0 comments on commit 6e52398

Please sign in to comment.