Skip to content

Commit

Permalink
fix: filter out taps on drag
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Dec 28, 2020
1 parent 60657fb commit bc709a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,11 @@ export const BottomSheet = React.forwardRef<
return memo
}

// Filter out taps
if (tap) {
return memo
}

const rawY = memo + my
const predictedDistance = my * velocity
const predictedY = Math.max(
Expand Down

0 comments on commit bc709a0

Please sign in to comment.