| 1624 | return loadingState === 'loading' ? <div>loading</div> : <div>empty state</div>; |
| 1625 | }; |
| 1626 | let AsyncGridList = props => { |
| 1627 | let {items, isLoading, onLoadMore, ...listBoxProps} = props; |
| 1628 | return ( |
| 1629 | <GridList |
| 1630 | {...listBoxProps} |
| 1631 | aria-label="async gridlist" |
| 1632 | renderEmptyState={() => renderEmptyState()}> |
| 1633 | <Collection items={items}> |
| 1634 | {item => <GridListItem id={item.name}>{item.name}</GridListItem>} |
| 1635 | </Collection> |
| 1636 | <GridListLoadMoreItem isLoading={isLoading} onLoadMore={onLoadMore}> |
| 1637 | Loading... |
| 1638 | </GridListLoadMoreItem> |
| 1639 | </GridList> |
| 1640 | ); |
| 1641 | }; |
| 1642 | |
| 1643 | let onLoadMore = jest.fn(); |
| 1644 | let observe = jest.fn(); |
nothing calls this directly
no test coverage detected