question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BottomSheetBackdrop component doesn't show up at all when setting the `appearsOnIndex` prop

See original GitHub issue

Bug

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

  1. Set the BottomSheetBackdrop prop appearsOnIndex={0}
  2. Open the bottom sheet modal and the backdrop doesn’t show

Describe what you expected to happen:

  1. Set the BottomSheetBackdrop prop appearsOnIndex={0}
  2. Backdrop should show up as soon as the modal opens to the first snap point

Reproducible sample code

Screen Shot 2021-07-10 at 8 19 11 PM Screen Shot 2021-07-10 at 8 17 51 PM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
Alaa-Bencommented, Nov 29, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found