Skip to content

Is it possible to use a grid list instead of list box inside a select? #3896

Answered by bilduong
bilduong asked this question in Q&A
Discussion options

You must be logged in to vote

I think I found a workaround / fix for this use case. By adding a FocusScope with autoFocus (https://react-spectrum.adobe.com/react-aria/FocusScope.html) around the GridList (specifically the ul Element), the focus will transfer as intended and everything works like a charm.

I'll still need to do some device testing, but this seems promising.

Code Example with "Workaround"

https://codesandbox.io/s/blissful-glade-0h5d56?file=/src/App.js

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bilduong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant