Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent adding cells under the ground when item index is the last one
When VirtualFlow is wrapped in a VirtualizedScrollPane and is scrolled, so that the last cell is being shown, this method should return 0. However, due to a scroll bar temporarily adjusting the viewport length, it returns a value that's roughly the height of the last cell's node. Thus, the call in `fillViewportFrom` will add more cells under the ground and shift them towards the sky. This call then hides the last item and the viewport appears to scroll up by one cell. The change insures that the last index always returns 0 rather than a postive value that causes the cell shift.
- Loading branch information