scroll down to close bottom sheet in scrollview doesnt work in ios
See original GitHub issueBug
Hello I have a simple problem but can not handle it.
const data = useMemo(
() =>
Array(50)
.fill(0)
.map((_, index) => index),
[]
);
// render
const renderItem = useCallback(
(item) => (
<View key={item}>
<Text>{item}</Text>
</View>
),
[]
);
<BottomSheet
ref={bottomSheetRef}
index={0}
snapPoints={snapPoints}
onChange={handleSheetChanges}
style={styles.sheetContainer}
>
<BottomSheetScrollView>{data.map(renderItem)}</BottomSheetScrollView>
</BottomSheet>
this is how my codes look like.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 2.2.2 |
react-native | 0.63.2 |
react-native-reanimated | 1.13.2 |
react-native-gesture-handler | 1.7.0 |
Steps To Reproduce
- i open bottomsheet with a button
- scroll the view inside.
- scroll down to the top of contents and trying to keep scrolling down so that bottom sheet can be scrolled down and closed
- but bottom sheet is not scrolled down in ios. in android it works
Describe what you expected to happen:
- i want bottom sheet can be closed with scrolling down in ios too
Reproducible sample code
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
UIScrollView not scrolling - ios - Stack Overflow
You need to set the contentSize property of the scroll view in order for it to scroll properly.
Read more >Troubleshooting | React Native Bottom Sheet - GitHub Pages
To resolve this issue, please use ScrollView & FlatList from react-native-gesture-handler provide instead react-native . import { ScrollView,
Read more >iOS 15 'Drag to Dismiss' Regression | Apple Developer Forums
Not sure I completely follow this suggestion, but if you begin dragging from a region outside the scroll view, the modal gesture does...
Read more >gorhom/bottom-sheet - npm
Seamless keyboard handling for iOS & Android. Support pull to refresh for scrollables. Support FlatList, SectionList, ScrollView & View ...
Read more >Scrollable Bottom Sheet with virtualisation, native animations ...
The library you linked is great for bottom sheets that don't need to render lists, otherwise you'll experience performance problems if you ...
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
Hi @casysj @moseffect21 , try adding
0
to your snapPoint. Looks something like thishope it works well Related PR: #322
Any updates?