SectionList onViewableItemsChanged behaviour difference between iOS and Android/Web #48887
Labels
Component: SectionList
Needs: Triage 🔍
Newer Patch Available
Platform: Android
Android applications.
Platform: iOS
iOS applications.
Description
Expected:
SectionList
onViewableItemsChanged
should correctly reportviewableItems
across multiple sections when items from those sections are within the viewport. This is the current behaviour on Android and Web.Actual:
SectionList
onViewableItemsChanged
will only reportviewableItems
for one section at at time, even if items from multiple sections are within the viewport. This is the current behaviour on iOS.Notes:
getItemLayout
restores the expected behaviour on iOS.viewableItems
parameter. However, the issue is also true of thechanged
parameter.viewabilityConfig
.Steps to reproduce
Reproduced locally in vanilla
react-native@0.76.3
with new architecture. Also reproduced locally inreact-native@0.75.4
without new architecture.React Native Version
0.76.3
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@pbcodes/onviewableitemschanged-behaviour-difference-between-ios-and-android-or-web
Screenshots and Videos
iOS ❌
Scroll until items from 2 sections are within viewport
Scroll further until the first section has left the viewport
Android ✅
Scroll until items from 2 sections are within viewport
Web ✅
Scroll until items from 2 sections are within viewport
The text was updated successfully, but these errors were encountered: