lodev09 / react-native-true-sheet

The true native bottom sheet experience 💩
https://sheet.lodev09.com
MIT License
394 stars 12 forks source link

Sheet open/close gesture fails with ScrollView inside GestureHandlerRootView #68

Closed SickanK closed 1 month ago

SickanK commented 1 month ago

Description When using a ScrollView wrapped with a GestureHandlerRootView, the sheet open and close gesture stops working. The gesture functions correctly when using either a ScrollView or a GestureHandlerRootView individually, but fails when they are combined.

Steps to Reproduce

  1. Set up a project using react-native-true-sheet
  2. Add a ScrollView wrapped with a GestureHandlerRootView. The issue persists regardless of which library (react-native or react-native-gesture-handler) you import ScrollView from.
  3. Implement the sheet using react-native-true-sheet
  4. Attempt to use the sheet open and close gesture

Reproduction Repository A minimal reproduction of this issue can be found at: https://github.com/SickanK/true-sheet-rngh-scrollview

Environment react-native-true-sheet version: 0.12.3 React Native version: 0.74.3 React Native Gesture Handler version: 2.16.1 Platform: Android

Additional Notes

Love react-native-true-sheet so far, looking forward to future updates!

lodev09 commented 1 month ago

Thanks for reporting. I'll check when I get a chance, haven't tried combining both yet.

lodev09 commented 1 month ago

I took a look on this one but unfortunately, this is beyond me.. I don't know how RNGH internals works regarding gestures but somehow the wrapped ScrollView doesn't play well with the sheet.

I believe the solution has something to do with the waitFor prop to handle overlapping gestures. However, it's not compatible with the native sheet gesture.

I don't know your use-case but try to stick with GestureDetector which works right out of the gate.