Open Nantris opened 7 months ago
This happens for me on the latest release FWIW
up
Anyone experiencing this should really upvote the initial report comment - because maintainers can sort issues by number of reactions.
same bug on 1.7.0
same bug on 1.7.1
"@shopify/flash-list": "^1.7.1",
solved by
<MasonryFlashList
...
optimizeItemArrangement={true}
overrideItemLayout={ (layoutObject, sourceData, ...) => { layoutObject.size = calculateItemHeight(sourceData) } }
/>
@hanwenbo it's not exactly clear what your solution is. Where does calculateItemHeight
come from? It seems like that's the key to your fix but calculating item height isn't necessarily easy (I think.)
@Nantris You need to calculate the height yourself ,Yes, it's not easy to calculate, but you still have to figure out how to calculate it, and flash-list for you will make the performance of the list uncontrollable
It is still just a bug. After updating a piece of data, even if the overrideItemLayout is calculated correctly, a bug will occur
If I don't update one of these, there's no bug, and there's no bug in the append data
recomputeViewableItems,extraData, data, recordInteraction ,each change cannot recalibrate the layout change
This happens when data is modified and when data is deleted
If the height of a piece of data is changed, the probability of triggering this bug is the highest
"@shopify/flash-list": "^1.7.1",
Current behavior
MasonryFlashList
appends items to the first column when they should be dispersed evenly between the first and second columns on a 2-column masonry layout.Expected behavior
More even column allotments
To Reproduce
Unknown exactly when this occurs or doesn't, but it's rather frequent.
Platform:
Environment
@shopify/flash-list version: 1.4.3 (I understand this is old, but I see no entries in the release history to suggest it is fixed and I will test a newer version as soon as I am able to)