Replies: 1 comment 3 replies
-
Could you pass the props on context? We do that a lot for RSP https://react-spectrum.adobe.com/react-spectrum/layout.html#slots Otherwise, I might need more of an example outlining the issue you're facing. |
Beta Was this translation helpful? Give feedback.
3 replies
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.
-
Hi,
I am building a SearchAutocomplete component with useComboBox and the react-stately components Item and Section. I have a scenario where it would be beneficial to be able to pass className or other props to Section or Item but this isn't possible. Can I invert the composition of the component so I can pass my ListBoxOption or ListBoxSection to the ListBox as children and they handle rendering of the Item or Section? Does this still work correctly with react-stately? Currently the ListBox component maps over
state.collection
to render either the ListBoxOption or ListBoxSection based on theitem.type
.Are there any examples online of the structure I am proposing?
Beta Was this translation helpful? Give feedback.
All reactions