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
When using FlashList with masonry enabled and optimizeItemArrangement set to false, items can sometimes disappear during scrolling. The issue is more likely to happen where there is a difference in column heights.
Current behavior
When there is a significant discrepancy of visible items' indices, cards sometimes disappear unexpectedly while scrolling. The root cause seems to be that the layout uses binary search for calculating visible items; and because binary search expects sorted items, the algorithm fails when there is a difference in indices between columns
Video:
flashlist-issue.mp4
Expected behavior
Cards should not disappear or flicker as user scrolls.
Reproduction
The issue can be reproduced in fixture app.
Disable optimizeItemArrangement in ComplexMasonry example:
optimizeItemArrangement={false}
Open the ComplexMasonry screen and scroll down (see video above)
Platform
iOS
Android
Web (if applicable)
Environment
FlashList version:"2.2.2"
Additional context
Checklist
I've searched existing issues and couldn't find a duplicate
I've provided a minimal reproduction (Expo Snack preferred)
I'm using the latest version of @shopify/flash-list