Skip to content

How to build customize RAC Combobox to conditionally render a Section or ListBoxItem #6822

Answered by reidbarber
camoy1 asked this question in Q&A
Discussion options

You must be logged in to vote

I would recommend looking at this example: https://react-spectrum.adobe.com/react-aria/ComboBox.html#dynamic-items

But instead of making the assumption that the top level is a section like this example does, you'll want to check the item for what signifies a section (maybe you have type in your items, or you check for children), then conditionally render Section or ListBoxItem based on that.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by camoy1
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