Scroll start logic should work when overscroll too

This commit is contained in:
Lim Chee Aun 2023-01-20 16:05:27 +08:00
parent 1b6348fb08
commit baf139762c

View file

@ -51,7 +51,7 @@ export default function useScroll({
previousScrollStart = scrollStart;
}
setReachStart(scrollStart === 0);
setReachStart(scrollStart <= 0);
setReachEnd(scrollStart + clientDimension >= scrollDimension);
setNearReachStart(scrollStart <= distanceFromStartPx);
setNearReachEnd(