Skip to content

Commit

Permalink
examples: Use fetched item count for simple examples (remix-run#4003)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkulinski authored and kayac-chang committed Sep 3, 2022
1 parent 491d3e4 commit 5b7b201
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@
- realjokele
- redabacha
- reggie3
- rkulinski
- rlfarman
- roachjc
- robindrost
Expand Down
2 changes: 1 addition & 1 deletion examples/infinite-scrolling/app/routes/offset/simple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function Index() {
const parentRef = useRef<HTMLDivElement>(null);

const rowVirtualizer = useVirtual({
size: data.totalItems,
size: items.length,
parentRef,
estimateSize: useCallback(() => 35, []),
initialRect: { width: 0, height: 800 },
Expand Down
2 changes: 1 addition & 1 deletion examples/infinite-scrolling/app/routes/page/simple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function Index() {
const parentRef = useRef<HTMLDivElement>(null);

const rowVirtualizer = useVirtual({
size: data.totalItems,
size: items.length,
parentRef,
estimateSize: useCallback(() => 35, []),
initialRect: { width: 0, height: 800 },
Expand Down

0 comments on commit 5b7b201

Please sign in to comment.