From e9d81afbd412812a2f5e841656f88044ed3d1e39 Mon Sep 17 00:00:00 2001 From: SaltyWater Date: Wed, 9 Sep 2020 13:35:57 +0800 Subject: [PATCH] [fix] Forward scroll end event to ScrollView onScroll handler Close #1728 --- .../react-native-web/src/exports/ScrollView/ScrollViewBase.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native-web/src/exports/ScrollView/ScrollViewBase.js b/packages/react-native-web/src/exports/ScrollView/ScrollViewBase.js index 22a958155..cb2b9f4c8 100644 --- a/packages/react-native-web/src/exports/ScrollView/ScrollViewBase.js +++ b/packages/react-native-web/src/exports/ScrollView/ScrollViewBase.js @@ -111,7 +111,9 @@ const ScrollViewBase = forwardRef((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)) {