Skip to content

Commit abfcde0

Browse files
committed
update gridlist stories so that it is easier to see useLoadMore is only called once per load
due to the number of items returned by the star wars api and the height of the rows, making the gridlist too tall causes the loadmore to be called multiple times in order to fill enough content for a single page
1 parent f34fc0c commit abfcde0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/react-aria-components/stories/GridList.stories.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,8 @@ export const AsyncGridList = () => {
254254
return (
255255
<GridList
256256
className={styles.menu}
257-
style={{height: 400}}
257+
style={{height: 200}}
258258
aria-label="async gridlist"
259-
// TODO: same deal here, this won't actually render
260259
renderEmptyState={() => renderEmptyState({isLoading: list.isLoading})}>
261260
<Collection items={list.items}>
262261
{(item: Character) => (
@@ -294,7 +293,7 @@ export const AsyncGridListVirtualized = () => {
294293
}}>
295294
<GridList
296295
className={styles.menu}
297-
style={{height: 400}}
296+
style={{height: 200}}
298297
aria-label="async virtualized gridlist"
299298
renderEmptyState={() => renderEmptyState({isLoading: list.isLoading})}>
300299
<Collection items={list.items}>

0 commit comments

Comments
 (0)