(props: {
items?: typeof items;
isLoading?: boolean;
onLoadMore?: () => void;
})
| 2105 | return <div>empty state</div>; |
| 2106 | }; |
| 2107 | let AsyncMenu = (props: { |
| 2108 | items?: typeof items; |
| 2109 | isLoading?: boolean; |
| 2110 | onLoadMore?: () => void; |
| 2111 | }) => { |
| 2112 | let {items, isLoading, onLoadMore} = props; |
| 2113 | return ( |
| 2114 | <Menu aria-label="async menu" renderEmptyState={() => renderEmptyState()}> |
| 2115 | <Collection items={items}> |
| 2116 | {item => <MenuItem id={item.name}>{item.name}</MenuItem>} |
| 2117 | </Collection> |
| 2118 | <MenuLoadMoreItem isLoading={isLoading} onLoadMore={onLoadMore}> |
| 2119 | Loading... |
| 2120 | </MenuLoadMoreItem> |
| 2121 | </Menu> |
| 2122 | ); |
| 2123 | }; |
| 2124 | |
| 2125 | let onLoadMore = jest.fn(); |
| 2126 | let observe = jest.fn(); |
nothing calls this directly
no test coverage detected