| 2105 | return <div>empty state</div>; |
| 2106 | }; |
| 2107 | let AsyncListbox = props => { |
| 2108 | let {items, isLoading, onLoadMore, ...listBoxProps} = props; |
| 2109 | return ( |
| 2110 | <ListBox |
| 2111 | {...listBoxProps} |
| 2112 | aria-label="async listbox" |
| 2113 | renderEmptyState={() => renderEmptyState()}> |
| 2114 | <Collection items={items}> |
| 2115 | {item => <ListBoxItem id={item.name}>{item.name}</ListBoxItem>} |
| 2116 | </Collection> |
| 2117 | <ListBoxLoadMoreItem isLoading={isLoading} onLoadMore={onLoadMore}> |
| 2118 | Loading... |
| 2119 | </ListBoxLoadMoreItem> |
| 2120 | </ListBox> |
| 2121 | ); |
| 2122 | }; |
| 2123 | |
| 2124 | let onLoadMore = jest.fn(); |
| 2125 | let observe = jest.fn(); |
nothing calls this directly
no test coverage detected