Skip to content

Commit

Permalink
Combobox: Enter key opens menu (#3154)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarthim1111 authored Sep 19, 2024
1 parent c948a85 commit 6962282
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/combobox/combobox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,17 @@ class Combobox extends React.Component {
};

handleInputSubmit = (event) => {
if (
this.state.activeOption === undefined &&
this.state.activeOptionIndex === -1
) {
if (this.state.isOpen === false) {
if (!event.shiftKey) {
this.openDialog();
}
} else this.handleRequestClose(event, {});
}

if (this.state.activeOption && this.state.activeOption.disabled) {
return;
}
Expand Down

0 comments on commit 6962282

Please sign in to comment.