Skip to content

How to make keyboard navigation support wrap around? #4242

Answered by LFDanLu
joshua7v asked this question in Q&A
Discussion options

You must be logged in to vote

A bunch of the collection specific react aria hooks (useComboBox, useSelectableList, etc) use useSelectableCollection which supports the shouldFocusWrap option which will allow focus to go to the first/last item if you hit the bottom/top of your collection. useSelectableList supports that prop as well which useMenu, useListBox etc use as well. Note some of those higher level hooks may not propagate shouldFocusWrap at the moment however.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@joshua7v
Comment options

@LFDanLu
Comment options

LFDanLu Mar 23, 2023
Collaborator

Answer selected by joshua7v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants