BottomSheetFlatList is scrollable only when the bottomSheet is on the top level
See original GitHub issueBug
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | ^1.4.1 |
react-native | “https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz” |
react-native-gesture-handler | ~1.7.0 |
Steps To Reproduce
1.scrolling up the bottomSheet
2.scroll horizontally images
3. scroll down 50% the bottomSheet
4.scroll horizontally images -> cannot.
Describe what you expected to happen:
1.i would like to be able to scroll the images horizontally also when the bottomSheet is not on the top level.
Reproducible sample code
import { BottomSheetFlatList } from '@gorhom/bottom-sheet'
import React from 'react'
import {View, Text, TouchableOpacity, Image, StyleSheet } from 'react-native'
import { ImagesSliderProps } from './ImagesSlider.d'
const ImagesSlider: React.FC<ImagesSliderProps> = ({title, images}) => {
const renderImage = (itemData:any) => {
return (
<TouchableOpacity activeOpacity={0.8} onPress={()=> console.log(itemData.item)}>
<Image style={styles.image} source={{uri:itemData.item.key}}/>
</TouchableOpacity>
)
}
return (
<View style={{flex:1}}>
<Text>{title}</Text>
<BottomSheetFlatList
showsHorizontalScrollIndicator={true}
initialNumToRender={2}
keyExtractor={(item, index) => index.toString()}
horizontal={true}
data={images}
renderItem={renderImage}/>
</View>
)
}
const styles = StyleSheet.create({
image: {
marginHorizontal: 5,
width:200,
height:150,
resizeMode: 'stretch'
}
})
export default ImagesSlider;
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
React native Flatlist does not scroll inside the custom ...
Inside my bottom sheet, I have used flatList where I fetched the data and render the items as a card. Up-till now everything...
Read more >Scrollables | React Native Bottom Sheet - GitHub Pages
These lists I called them Scrollables and they are: BottomSheetFlatList; BottomSheetSectionList; BottomSheetScrollView; BottomSheetView. BottomSheetFlatList.
Read more >react-native-scroll-bottom-sheet - npm package - Snyk
react-native-scroll-bottom-sheet. v0.7.0. Cross platform scrollable bottom sheet with virtualization support, running at 60 FPS and fully implemented in JS land ...
Read more >A React Native Bottom Sheet with Fully Configurable Options
Extracting scrollable content to allow developers customize the sheet content, like integrate React Navigation as the sheet content. Both libraries are great!
Read more >How to scroll your bottom sheet differently with Flutter?
Some time ago I had to implement a bottom sheet that should be possible to expand or ... margin: EdgeInsets.only(top: mediaQueryData.
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 Free
Top 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
you should use
FlatList
fromreact-native-gesture-handler
BottomSheetFlatList
meant to be for vertical sheet content. I think I’ll need to update docs to mention this clearly