[v4] `enablePanDownToClose` not working on iOS and Android
See original GitHub issueBug
I nested the bottomSheet in a react-native-modal component and use the modal backdrop for onClose.
The prop enablePanDownToClose
is not working on my iOS and Android app.
If I wrap my app or component with GestureHandlerRootView
it doesn’t make any differences.
Do you have any idea?
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4 |
react-native | 0.64.3 |
react-native-reanimated | 2.2.4 |
react-native-gesture-handler | 1.10.3 |
Steps To Reproduce
- Add code from below
- Start your app
- Try to swipe
Describe what you expected to happen:
- BottomSheet should slide down
Reproducible sample code
return (
<Modal
isVisible={props.modalVisible}
useNativeDriver={true}
backdropOpacity={dimensions.shadowOpacity}
style={styles.modalCenteredView}
onBackdropPress={props.onClose}
onBackButtonPress={props.onClose}
statusBarTranslucent
hideModalContentWhileAnimating
>
<BottomSheet
ref={bottomSheetRef}
index={0}
snapPoints={props.bottomSheetHeight ? [props.bottomSheetHeight] : [DEFAULT_BOTTOM_SHEET_HEIGHT]}
enablePanDownToClose
>
<BottomSheetView style={styles.bottomContent}>{content}</BottomSheetView>
</BottomSheet>
</Modal>
);
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:7
Top Results From Across the Web
Bottom sheet is not getting closed in react native android
I am unable to close or swap top bottom the bottomsheet in android only. Also when keyboard appears this bottomsheet keeps transparent ...
Read more >Props | React Native Bottom Sheet - GitHub Pages
Defines how violently sheet has to be stopped while over dragging. type, default, required. number, 2.5, NO. detached . Defines whether the bottom...
Read more >React Native Development for iOS and Android: Differences
Yes, we can reuse most code when working with both platforms, but in the end Android and iOS are quite different systems, which...
Read more >Troubleshooting | Stream Chat - React Native SDK Docs
Without this some Android devices will fail to load images despite permissions being granted within the settings. Feedback. Camera not working#. iOS#. Add...
Read more >React Native - 4 Top Differences in Development for ...
Read about 4 top differences in the development of Android & iOS apps ... kind of problem, because Android Studio works on Apple's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
enablePanDownToClose didn’t work on android. Adding GestureHandlerRootView to App.js file resolved the issue for me.
use GestureHandlerRootView to wrap BottomSheet component and and adjust flex: 1 It works for me