Skip to content

Commit

Permalink
fix: enable sheetscroller to handle onScroll and onTouchStart on touc…
Browse files Browse the repository at this point in the history
…h devices
  • Loading branch information
marcinbittel committed Dec 6, 2024
1 parent 3031ff4 commit fe0b8ed
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 fe0b8ed

Please sign in to comment.