DEV Community

Discussion on: Build your own virtual scroll - Part II

Collapse
adamklein profile image
adam klein Author

Thanks!
The calculation for the end node was wrong, because it relied on the start node AFTER I reduced the renderAhead.
Also, visible count should be endNode - startNode + 1 (because if we're displaying nodes 1 to 10, we need 10 nodes, not 9).

Fixed in the example