Closed
Description
🙋 Feature Request
Im using the dynamic <Item>
collection component to render custom JSX for a <ListBox disabledKeys={[...]}>
option.
E.g.:
<ListBox items={animals}>{(item) => (
<Item>
<div classNames={item.disabled ? "" : ""}>{item.name}</div>
<div classNames={item.disabled ? "" : ""}>{item.describtion}</div>
</Item>
)}</ListBox>
Unfortunately I cant access some state of the rendered item, like disabled
, selected
, focus
, hover
, etc.
It would be great to have access to these information, so that I can change the styling for example.
🤔 Expected Behavior
Dynamic <Item>
components should have access to all state information.
😯 Current Behavior
Can't access any state in dynamic <Item>
components.
💁 Possible Solution
Forward state from useListState
🔦 Context
Can't apply custom styling for options in various states.
Activity