Description
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
System:
OS: macOS 14.1.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 161.58 MB / 16.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 18.14.2
path: /usr/local/bin/node
Yarn:
version: 1.22.10
path: ~/.npm-global/bin/yarn
npm:
version: 9.6.0
path: ~/.npm-global/bin/npm
Watchman:
version: 2023.12.04.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/nehabhandari/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.2 AI-232.10227.8.2321.11479570
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/nehabhandari/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.5
wanted: 0.73.5
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
info React Native v0.73.6 is now available (your project is running on v0.73.5).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.73.6
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.73.6
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos"
Stacktrace or Logs
-```
### Reproducer
-
### Screenshots and Videos
_No response_