Bug with animatedIndex prop of Backdrop Component in BottomSheetModal
See original GitHub issueBug: animatedIndex
prop of Backdrop Component in BottomSheetModal doesn’t work as expected
I think the animatedIndex
in BottomSheetModal has not correct type and can’t be animated using interpolate function of reanimated library.
If I use BottomSheet instead of BottomSheetModal, it works properly, but in BottomSheetModal, animatedIndex
doesn’t work properly
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 2.3 |
react-native | 0.63.4 |
react-native-reanimated | 1.9.0 |
react-native-gesture-handler | 1.10.3 |
Steps To Reproduce
- Create a BottomSheetModal
- Provide Custom Backdrop Component
- Try to animate the Backdrop using
animatedIndex
Describe what you expected to happen:
- I expected
animatedIndex
to be an animated value
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Custom Backdrop | React Native Bottom Sheet - GitHub Pages
When you provide your own backdrop component, it will receive these animated props animatedIndex & animatedPosition that indicates the position and the ...
Read more >@gorhom/bottom-sheet: Versions | Openbase
refactor: allow to render component inside default backdrop ( #662 ) ... fix: revert changes on BottomSheetModal that blocked stack behavour (15225ae).
Read more >Creating and styling a modal bottom sheet in React Native
In this tutorial, we'll create a basic application with a modal bottom sheet feature. We'll set up the app, fetch data, and style...
Read more >https://raw.githubusercontent.com/gorhom/react-nat...
... added onPress prop to backdrop component (#1029)(by @tarikpnr) ... revert changes on BottomSheetModal that blocked stack behavour ...
Read more >Bug with animatedIndex prop of Backdrop Component ... - GitAnswer
<BottomSheetModal ref={ref} index={1} snapPoints={snapPoints} onChange={handleSheetChanges} bottomInset={0} backdropComponent={(props) => <CustomBackdrop {...
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
Issue resolved! It was all about
snapPoints
.my previous
snapPoints
wasand I updated them to
Now the
animatedIndex
and animations works as expected. I don’t know why my previoussnapPoints
worked withBottomSheet
properly. It would be great if you can provide more information aboutsnapPoints
and how they works in the doc. So no one will have any issue same as mine.@gorhom
described here: https://github.com/gorhom/react-native-bottom-sheet/issues/846