-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll issue in horizontal flatlist in android (react native version 0.73.5) #43564
Comments
|
|
I've encountered a similar problem with the horizontal ScrollView. While I haven't experienced it on my Android 11 device, on later Android versions it seems to happen. |
Hey i just ran into this issue my self on version 0.73.4, i gave the contentContainerStyle of the flat list a min width of "100%" and it seems to get the job done. |
@jo7475 It seems to work. Thank you!! |
@jo7475 Hey Jo, thanks for the suggestion. However this does seem to disable the scroll entirely and if the items' size change dynamically, the user will not be able to scroll through the horizontal list. |
The same happened to me. I tested using react-native LTS 0.73.6 and when the list has only one element the behavior appears. A curious fact is that I tested on different devices/Android versions using BrowserStack, only devices with Android 12+ showed the behavior. In my case, adding <ScrollView contentContainerStyle={{ flexGrow: 1 }} /> |
Just came to write that |
|
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
1 similar comment
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
I am facing an issue in the scroll of the horizontal flatlist on android devices and simulators. Even if there is a single item in the flatlist, the user is able to scroll and the image remains on the right side after scroll until the user taps on it.
I started facing this issue after updating react native from version 0.70 to 0.73.5.
The code that is have written is:
<FlatList
horizontal={true}
data={props.data}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
keyExtractor={(item, index) => index.toString()}
renderItem={({ item, index }) => renderImageList(item, index)}
/>
Please refer to the below recording to understand my issue better.
scroll.issue.mov
Any help on this will be highly appreciated.
Steps to reproduce
<FlatList
horizontal={true}
data={props.data}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
keyExtractor={(item, index) => index.toString()}
renderItem={({ item, index }) => renderImageList(item, index)}
/>
React Native Version
0.73.5
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
The text was updated successfully, but these errors were encountered: