react-native-reanimated-bottom-sheet icon indicating copy to clipboard operation
react-native-reanimated-bottom-sheet copied to clipboard

Disable Swipe Down to close

Open alexkutaladze opened this issue 4 years ago • 4 comments
trafficstars

Is there a way to disable only close to swipe down gesture while keeping all the other gestures enabled?

alexkutaladze avatar Dec 10 '20 13:12 alexkutaladze

same question here

phuochau avatar Jun 21 '21 17:06 phuochau

Same - or, more optimally, swipe to close should only work when swiping the header, not the whole sheet.

princefishthrower avatar Oct 15 '21 07:10 princefishthrower

I figured this out, simply set-prop enabledContentGestureInteraction to false. (The README should probably be updated to say "swipeable" not "scrollable".) This disabled the swipe to close on the content (so you could put something in it like a scrollview for example and not be worried that scrolling there will close the sheet) Swiping on the header will still close the sheet.

princefishthrower avatar Oct 20 '21 10:10 princefishthrower

Interestingly we've seen that even if enabledContentGestureInteraction is false, you can still swipe to close on iOS devices 🤷‍♂️

princefishthrower avatar Sep 08 '22 10:09 princefishthrower