We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13bec04 commit 57fe328Copy full SHA for 57fe328
1 file changed
src/OptionList.tsx
@@ -142,7 +142,8 @@ const OptionList: React.RefForwardingComponent<
142
143
// ========================= Keyboard =========================
144
React.useImperativeHandle(ref, () => ({
145
- onKeyDown: ({ which }) => {
+ onKeyDown: event => {
146
+ const { which } = event;
147
switch (which) {
148
// >>> Arrow keys
149
case KeyCode.UP:
@@ -173,6 +174,10 @@ const OptionList: React.RefForwardingComponent<
173
174
onSelectValue(null);
175
}
176
177
+ if (open) {
178
+ event.preventDefault();
179
+ }
180
+
181
break;
182
183
0 commit comments