Bug Fix: Calculate getTotalSize correctly when using multiple lanes #660
+16
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my application I have a waterfall style layout so the last item is not guaranteed to be the furthest away. I was having issues with the sizing not being correct, so after digging in I found the root cause and implemented a fix.
Example of my measurements array (look at the last 2 items and notice the 2nd to last has a greater end property):

I also included a small optimization for one lane. I am happy to tweak the logic in any way so just let me know. Happy to contribute!