Skip to content

Commit 6962282

Browse files
authored
Combobox: Enter key opens menu (#3154)
1 parent c948a85 commit 6962282

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/combobox/combobox.jsx

+11
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,17 @@ class Combobox extends React.Component {
751751
};
752752

753753
handleInputSubmit = (event) => {
754+
if (
755+
this.state.activeOption === undefined &&
756+
this.state.activeOptionIndex === -1
757+
) {
758+
if (this.state.isOpen === false) {
759+
if (!event.shiftKey) {
760+
this.openDialog();
761+
}
762+
} else this.handleRequestClose(event, {});
763+
}
764+
754765
if (this.state.activeOption && this.state.activeOption.disabled) {
755766
return;
756767
}

0 commit comments

Comments
 (0)