Shopify / flash-list

A better list for React Native
https://shopify.github.io/flash-list/
MIT License
5.58k stars 283 forks source link

Layout is sometimes broken after data is updated #1318

Open Elrohil44 opened 2 months ago

Elrohil44 commented 2 months ago

Current behavior

Sometimes when data is updated and some sections are inserted and/or removed, then the layout breaks. In my case the last item is cut off although the footer is displayed. Reproduction video

  1. At first the content is correctly displayed
  2. I press toggle elements to remove two elements from data array
  3. The last element is not rendered correctly – it does not fit within render window

Expected behavior

All elements should be fully visible after content changes.

To Reproduce

https://github.com/Elrohil44/flash-list-bug

Platform:

Environment

1.7.1

hthieu1110 commented 2 months ago

I got the same behavior, if I change the elements in the list, sometime it got disappear. It's random but I find that it happens usually when switching for a long list to shorter one, in the inverse case, from short list to longer list, I cannot produce the bug.

nduyvu1511 commented 1 month ago

I have the same problem. Each message item has a dynamic height, so I had to revert back to using FlatList. Hopefully, it will be fixed soon.