Clusterize.js
Clusterize.js copied to clipboard
How to best insert elements in the middle of an existing list?
Revising my previous issue to simplify a question,
According to the API, there is a prepend and append but there is no insertAt (index).
I'm wondering how I can best implement this while maintaining the integrity of the clusters?
I am also after a removeAt(index)
function as well
During initialization you provide array of data to rows parameter.
var data = ['<tr>…</tr>', '<tr>…</tr>', …];
var clusterize = new Clusterize({
rows: data,
scrollId: 'scrollArea',
contentId: 'contentArea'
});
Later in your code change this data
array as you need and call clusterize.update(data)
@NeXTs what if we use the dom element on init ? I have a table with a few rows and based on user interactions will add some rows in between (expand functionnality) how do I tell clusterize to refresh ?
I have a quick question regarding expand/collapse of the html table. We have an html table which shows hierarchy and when I do collapse it only collapses the rows in the block. I was wondering if there is a way to collapse all the rows which have not been loaded yet.