({
collection,
...props
}: AriaMenuOptions<object> &
Omit<TreeProps<object>, 'children'> & {
collection: ICollection<Node<object>>;
})
| 97 | } |
| 98 | |
| 99 | function MenuInner({ |
| 100 | collection, |
| 101 | ...props |
| 102 | }: AriaMenuOptions<object> & |
| 103 | Omit<TreeProps<object>, 'children'> & { |
| 104 | collection: ICollection<Node<object>>; |
| 105 | }) { |
| 106 | let state = useTreeState({...props, collection, children: undefined}); |
| 107 | let ref = useRef<HTMLUListElement>(null); |
| 108 | let {menuProps} = useMenu(props, state, ref); |
| 109 | |
| 110 | return ( |
| 111 | <ul {...menuProps} ref={ref} className="react-aria-Menu"> |
| 112 | <TreeStateContext.Provider value={state}> |
| 113 | {[...state.collection].map(item => ( |
| 114 | <Fragment key={item.key}>{item.render!(item)}</Fragment> |
| 115 | ))} |
| 116 | </TreeStateContext.Provider> |
| 117 | </ul> |
| 118 | ); |
| 119 | } |
nothing calls this directly
no test coverage detected