Replies: 1 comment 1 reply
-
For One way to get rid of it would be to wrap the keyboard handler in your own. Something like this: let {triggerProps} = useSelect(...);
let onKeyDown = e => {
if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') return;
triggerProps.onKeyDown(e);
};
<button {...triggerProps} onKeyDown={onKeyDown}> |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
The behavior in the
useSelect
allows for the right and left arrows to change the current selection (https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/select/src/useSelect.ts#L80).Is it possible to make this an opt-in (or opt-out) feature? Having the arrow keys behave in this manner breaks from native select field behaviors, so it would be nice to disable.
Thanks,
Brandon
Beta Was this translation helpful? Give feedback.
All reactions