BottomSheetBackdrop component doesn't show up at all when setting the `appearsOnIndex` prop
See original GitHub issueBug
The BottomSheetBackdrop
component wont show up when setting the appearsOnIndex={0}
for example. As I understand the prop is to tell the backdrop to show up when the snap point in on the index provided. If thats not the case then can someone provide a way of doing that. In my case the backdrop doesn’t show when the index is at 0
only when dragging the component up to the other snap points does it show, however like mentioned above, if I set the property of the backdrop appearsOnIndex={0}
it doesn’t show at all.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4.0.0-alpha.19 |
react-native | ^0.64.1 |
react-native-reanimated | ^2.1.0 |
react-native-gesture-handler | ^1.10.3 |
Steps To Reproduce
- Set the
BottomSheetBackdrop
propappearsOnIndex={0}
- Open the bottom sheet modal and the backdrop doesn’t show
Describe what you expected to happen:
- Set the
BottomSheetBackdrop
propappearsOnIndex={0}
- Backdrop should show up as soon as the modal opens to the first snap point
Reproducible sample code
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
expo - React Native bottom sheet opens when TextInput has ...
Found a fix for the problem, it looks like it had to do with the keyboard and expo. I noticed that when the...
Read more >Props | React Native Bottom Sheet - GitHub Pages
Component to be placed as a sheet backdrop, by default is set to null , however the library also provide a default implementation...
Read more >Making React fast by default and truly reactive - Legend
The whole component doesn't need to re-render every time, ... components, wrap them in memo , and pass down all the props they...
Read more >Useful Patterns by Use Case - React TypeScript Cheatsheets
TODO: this section needs work to make it simplified. Usecase: same as above, but for a React Component you don't have access to...
Read more >Troubleshooting | React Navigation
If that doesn't work, you can also try the following: ... The component prop expects a React Component, but in the example, it'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
@ramirezabel you need to provide
disappearsOnIndex
with-1
, the default value is0
https://github.com/gorhom/react-native-bottom-sheet/blob/73decd3f13f17f585796556fc2bd43f408be8603/src/components/bottomSheetBackdrop/types.d.ts#L24-L29
@gorhom A bit weird: on some phones (Honor, Android 12 for example), setting disappearsOnIndex={-1} “freezes” the UI when navigating to the concerned screen. After some investigation, it seems it’s the backdrop not unmounting correctly: bottomsheet is closed but backdrop still mounted.