PedroBern / react-native-collapsible-tab-view

A cross-platform Collapsible Tab View component for React Native
MIT License
812 stars 159 forks source link

fix: recycling and re-rendering issues with Masonry #360

Closed gkartalis closed 10 months ago

gkartalis commented 10 months ago

Description

When adding the lines for calling loadMore onEndReached of MasonryFlashlist we get this weird behavior in the example where the list flashes and returns to the top.

This PR fixes that but it requires exporting recyclerlistviewUnsafe from MasonryFlashListRef.

This is happening due to us relying on the recyclerlistviewUnsafe while it not existsing on the MasonryFlashListRef interface.

Opened a PR in flash-list about that in order to solve the re-rendering issues. and we need to merge this PR after the related flashlist pr gets merged and we bump the version here. turns out we don't need the other PR! Realised it after cleaning up the patch!

⚠️ I have patched the shopify library on this PR just to make sure that this solution works and will clean everything up before merging this.

Follow ups:

Before After
gkartalis commented 10 months ago

@andreialecu let me know if you have any suggestions on how to proceed! Would love to see this merged because it solves many issues for us at Artsy!

Turns out we don't explicitly need the shopify PR to get merged for this to work so they can be merged independently! 🎉

andreialecu commented 10 months ago

Alright. Going to merge this now.

andreialecu commented 10 months ago

Released as 6.2.1