Skip to content

Commit

Permalink
Merge pull request #182 from marcinbittel/main
Browse files Browse the repository at this point in the history
fix: enable Sheet.Scroller to handle onScroll and onTouchStart on touch devices
  • Loading branch information
Temzasse authored Dec 27, 2024
2 parents 4029c2e + fe0b8ed commit 84482ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/SheetScroller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ const SheetScroller = forwardRef<any, SheetScrollerProps>(

function onScroll(e: UIEvent<HTMLDivElement>) {
determineDragState(e.currentTarget);
if (rest.onScroll) {
rest.onScroll(e);
}
}

function onTouchStart(e: TouchEvent<HTMLDivElement>) {
determineDragState(e.currentTarget);
if (rest.onTouchStart) {
rest.onTouchStart(e);
}
}

const scrollProps = isTouchDevice()
Expand Down

0 comments on commit 84482ea

Please sign in to comment.