You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have built a column of images in the FlatList. Many have different sizes.
but during scrolling, something goes wrong, and the list jumps to a certain place. I've recorded a video, and I'm attaching it to the message.
Steps to reproduce
I have created a repository where I can test the problem myself.
React Native Version
0.76.5
Affected Platforms
Runtime - Android
Output of npx react-native info
npx react-native info
info Fetching system and libraries information...
(node:1516) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-13620H
Memory: 2.99 GB / 15.71 GB
Binaries:
Node:
version: 22.11.0
path: C:\Program Files\nodejs\node.EXE
Yarn:
version: 1.22.19
path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm:
version: 10.9.0
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-241.15989.150.2411.11948838
Visual Studio: Not Found
Languages:
Java:
version: 17.0.11
path: /c/Program Files/Microsoft/jdk-17.0.11.9-hotspot/bin/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.5
wanted: 0.76.5
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
// Calculate cumulative heights using useMemo
const cumulativeHeights = React.useMemo(() => {
return IMAGES.reduce((acc, item, index) => {
const currentHeight = gettSizeOfTheImageToTheScreen(item);
acc.push((acc[index - 1] || 0) + currentHeight); // Add current height to the previous sum
return acc;
}, []);
}, [IMAGES, W]);
// Function to get cumulative height of all images up to the given index
const gettSizeOfAllImagesToTheScreen = index =>
cumulativeHeights[index - 1] || 0; // Return 0 for index 0
Description
I am developing in windows for android
I have built a column of images in the FlatList. Many have different sizes.
but during scrolling, something goes wrong, and the list jumps to a certain place. I've recorded a video, and I'm attaching it to the message.
Steps to reproduce
I have created a repository where I can test the problem myself.
React Native Version
0.76.5
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/valery-lavrik/flatlist_test
Screenshots and Videos
output.compress-video-online.com.mp4
The text was updated successfully, but these errors were encountered: