Skip to content

Commit

Permalink
[fix] Forward scroll end event to ScrollView onScroll handler
Browse files Browse the repository at this point in the history
Close #1728
  • Loading branch information
KingAmo authored and necolas committed Sep 9, 2020
1 parent 9ed9231 commit e9d81af
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ const ScrollViewBase = forwardRef<Props, *>((props, forwardedRef) => {
if (scrollTimeout.current != null) {
clearTimeout(scrollTimeout.current);
}
scrollTimeout.current = setTimeout(handleScrollEnd, 100);
scrollTimeout.current = setTimeout(() => {
handleScrollEnd(e);
}, 100);
if (scrollState.current.isScrolling) {
// Scroll last tick may have changed, check if we need to notify
if (shouldEmitScrollEvent(scrollState.current.scrollLastTick, scrollEventThrottle)) {
Expand Down

0 comments on commit e9d81af

Please sign in to comment.