BottomSheetScrollView cannot scroll when used with Dynamic Snap Point
See original GitHub issueBug
It seems BottomSheetScrollView
cannot be used with dynamic snap points.
it’s necessary in a case where the content of the bottom sheet can be small and can be larger than the bottom sheet’s maximum height.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | v4.0.0-alpha.13 |
react-native | 0.64.1 |
react-native-reanimated | 2.1.0 |
react-native-gesture-handler | 1.10.3 |
Steps To Reproduce
Use /example/src/screens/modal/DynamicSnapPointExample.tsx
- Change the code
BottomSheetView
toBottomSheetScrollView
- Press
Yes
button several times. - The scroll view cannot scroll.
https://user-images.githubusercontent.com/8144911/122670411-e5111d80-d1fc-11eb-8be6-49c50d95411a.mov
Describe what you expected to happen:
- The content can be scrolled when the content height is bigger than the bottom-sheet’s rendered area.
Reproducible sample code
The example code is used.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
[v3] BottomSheetScrollView not working with dynamic ... - GitHub
Bug. Any dynamic snapPoint change not working with BottomSheetScrollView , During scrolling BottomSheetModal disappears immediately. Environment ...
Read more >android - React Native - Reanimated Bottom Sheet: Content in ...
On Android only either the scrolling worked or the snap points. Never the two (Only the two-finger pinching). Can't scroll Flatlist inside react ......
Read more >How to add Snap to alignment feature in FlatList in React Native
Users can start scrolling at any time and can stop scrolling at any time. This type of FlatList doesn't have any restrictions.
Read more >BottomSheetScrollView | React Native Bottom Sheet
This needed when bottom sheet used with multiple scrollables to allow bottom sheet detect the current scrollable ref, especially when used with React ......
Read more >React Native scrollToIndex - Dynamic size item scroll inside ...
In this video tutorial you will learn about React Native scrollToIndex and how to scroll to an item inside a FlatList, ListView, ScrollView, ......
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
@tsugitta this is an expected behaviour, the react native scroll view expect a height or
flex: 1
to be able to scroll its content. in your case the content size stretched theBottomSheetScrollView
height too.i would advice to give the
BottomSheetScrollView
the initial measured content height, then let it be fixed, and content can grow and be scrollable 👏Try using maxHeight style on BottomSheetScrollView.