MCPcopy Create free account
hub / github.com/adobe/react-spectrum / AsyncGridList

Function AsyncGridList

packages/react-aria-components/test/GridList.test.js:1626–1641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 1

renderEmptyStateFunction · 0.70

Tested by

no test coverage detected