Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
fix(Combobox): Fix unintentionally prevented menu open
Browse files Browse the repository at this point in the history
  • Loading branch information
diondiondion committed Feb 4, 2021
1 parent fa0299e commit 29e1570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Combobox/Combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function Combobox({
onInputChange(e);
itemList.setHighlightedItem(0);

if (e.target.value && canOpenMenu) {
if (e.target.value) {
open();
}
}
Expand Down Expand Up @@ -123,8 +123,8 @@ function Combobox({
}
}
if (event.keyCode === KEY_CODES.ENTER) {
event.preventDefault();
if (isMenuOpen) {
event.preventDefault();
close();
itemList.selectHighlightedItem();
}
Expand Down

0 comments on commit 29e1570

Please sign in to comment.