From fe0b8ed05d8ca490d946a43a8daf7fe680b8ed38 Mon Sep 17 00:00:00 2001 From: Marcin Bittel Date: Fri, 6 Dec 2024 13:16:28 +0100 Subject: [PATCH] fix: enable sheetscroller to handle onScroll and onTouchStart on touch devices --- src/SheetScroller.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SheetScroller.tsx b/src/SheetScroller.tsx index 1c3f25c..97227a8 100644 --- a/src/SheetScroller.tsx +++ b/src/SheetScroller.tsx @@ -32,10 +32,16 @@ const SheetScroller = forwardRef( function onScroll(e: UIEvent) { determineDragState(e.currentTarget); + if (rest.onScroll) { + rest.onScroll(e); + } } function onTouchStart(e: TouchEvent) { determineDragState(e.currentTarget); + if (rest.onTouchStart) { + rest.onTouchStart(e); + } } const scrollProps = isTouchDevice()