How to build customize RAC Combobox to conditionally render a Section or ListBoxItem #6822
-
I want to create a reusable wrapper around RAC For example, based on the ComboBox docs's reusable wrapper – where the children are rendered inside the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 |
Beta Was this translation helpful? Give feedback.
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 forchildren
), then conditionally render Section or ListBoxItem based on that.