NeXTs / Clusterize.js

Tiny vanilla JS plugin to display large data sets easily
https://clusterize.js.org
MIT License
7.22k stars 412 forks source link

What to do if individual rows have significantly variable heights #38

Closed litera closed 9 years ago

litera commented 9 years ago

I understand that clusterize sets row height when it initializes, but I'm trying to display a list of article excerpts which may have significantly different amount of text in them resulting in significantly variable row height.

I expect this to break scrolling when dummy elements are added at the beginning and at the end of the list when being scrolled.

How does one solve this problem? Apparently Facebook has gotten away with it somehow as it does a similar trick with their feed.

NeXTs commented 9 years ago

Unfortunately clusterize doesn't work this way. Rows should be same height or approximately the same height otherwise it will not be able to calculate the necessary margins at the top and bottom.