[fix] Forward scroll end event to ScrollView onScroll handler

Close #1728
This commit is contained in:
SaltyWater
2020-09-09 13:35:57 +08:00
committed by Nicolas Gallagher
parent 9ed9231b04
commit e9d81afbd4
@@ -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)) {