Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite resize issue with scrollbar set to "always" #485

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/react/Virtualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
if (!onRangeChangeProp) return;

onRangeChangeProp(startIndex, endIndex);
}, [startIndex, endIndex]);

Check warning on line 315 in src/react/Virtualizer.tsx

View workflow job for this annotation

GitHub Actions / check

React Hook useEffect has a missing dependency: 'onRangeChangeProp'. Either include it or remove the dependency array. If 'onRangeChangeProp' changes too often, find the parent component that defines it and wrap that definition in useCallback

useImperativeHandle(
ref,
Expand All @@ -336,7 +336,7 @@
scrollBy: scroller._scrollBy,
};
},
[]

Check warning on line 339 in src/react/Virtualizer.tsx

View workflow job for this annotation

GitHub Actions / check

React Hook useImperativeHandle has missing dependencies: 'scroller._scrollBy', 'scroller._scrollTo', 'scroller._scrollToIndex', and 'store'. Either include them or remove the dependency array
);

for (let i = overscanedRangeStart, j = overscanedRangeEnd; i <= j; i++) {
Expand Down Expand Up @@ -371,6 +371,7 @@
width: isHorizontal ? totalSize : "100%",
height: isHorizontal ? "100%" : totalSize,
pointerEvents: scrollDirection !== SCROLL_IDLE ? "none" : "auto",
overflowY: 'hidden'
}}
>
{items}
Expand Down
Loading