NeXTs / Clusterize.js

Tiny vanilla JS plugin to display large data sets easily

Home Page:https://clusterize.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

variable row height and complex divs

sido420 opened this issue · comments

I'm building a chat application where I wanted to use Clusterize for the main chat page.

As we already know chat messages can be complex including text only, images+text, videos, embeds, iframes etc and can have dynamic heights (ie. not known in advance).

Would this be OK to use Clusterize for smooth scrolling and div management? The only plus point seems to be the potential size of list that might only grow up to a few thousand (that too very rarely). Any thoughts on this?

Also, I'm using Backbone.js/Marionette, so a list would be rendered first (exists in DOM), then following code would be used on it.

var clusterize = new Clusterize({
  scrollId: 'scrollArea',
  contentId: 'contentArea'
});

However, new items would be added to collection that would in turn add the new div element to content list div in DOM. Then, do I have to literally add new item to Clusterize instance as well or it tracks the content div automatically for new additions? Please suggest the most efficient approach here.

Thanks.

@sido420 Have u tried it? Does it work with variable height?