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
Expected: SectionListonViewableItemsChanged should correctly report viewableItems across multiple sections when items from those sections are within the viewport. This is the current behaviour on Android and Web.
Actual: SectionListonViewableItemsChanged will only report viewableItems for one section at at time, even if items from multiple sections are within the viewport. This is the current behaviour on iOS.
Notes:
Using getItemLayout restores the expected behaviour on iOS.
The reproducer uses the viewableItems parameter. However, the issue is also true of the changed parameter.
I've tested the scenarios with and without passing varying viewabilityConfig.
Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
Happening for me too and by pure luck I found this new issue related to this! Thank you! It works with FlashList, but this List has other problems... waiting for LegendList implementation of sticky... :D
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
[email protected]
with new architecture. Also reproduced locally in[email protected]
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: