What can I combine with useComboBox? Are useGridList and useTable allowed? #3916
Unanswered
donaldpipowitch
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Okay, I tried to look a little bit into the source code. I think you cannot properly use |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes it is a bit hard to wrap my head around all the hooks react-arias offers. So I hope I don't confuse things here.
I want users to select options from a list. Because the list should be filterable with a text input I use
useComboBoxinstead ofuseSelect. Right now it looks likeuseComboBoxhas to be paired withuseListBoxwhich handles the popup list box. At least this is how I understand the documentation.However
useGridListhas some features thatuseListBoxdoesn't have. When I have a look at the documentation (e.g. "If your list items contain only static content such as text and images, then consider using useListBox instead for a slightly better screen reader experience (especially on mobile).") I'd consider them as interchangeable - wherever I can useuseListBoxI should also be able to useuseGridList.It actually looks like I can also use the
listBoxPropsreturned fromuseComboBoxas the first parameter ofuseGridList. At least TypeScript doesn't complain, because the props for ListBox and GridLast have the same base type. Is this usage allowed?Going a step further. In case my GridList should look like a Table: Should I rather visually fake a Table with
useGridListor can I actually combineuseComboBoxwithuseTablein a correct way?Edit: Related discussion, but in the scope of a Select, not a ComboBox: #3896
Beta Was this translation helpful? Give feedback.
All reactions