Closed lharland closed 9 years ago
Hi Clusterize can't update specific rows, .update() method expects full list of rows.
For example you have initialized clusterize with
rows: ['<li>1</li>', '<li>2</li>', '<li>3</li>']
If you want to change second tag to be 5, you have to do
.update(['<li>1</li>', '<li>5</li>', '<li>3</li>'])
If you need to update list really often - better set verify_change: true while init clusterize.
It will save you from unnecessary DOM update in case when you are located in one cluster but updating row located in another cluster.
How can i give JSON Object as input in clusterize.js ?
@KalaiselvanMahendran you need to convert your JSON to array of strings. See https://github.com/NeXTs/Clusterize.js/issues/28#issuecomment-114988544
@NeXTs if i have millions of records how can i convert all the record as strings? it takes time to put a millions of data into the loop to convert it has a string. Is there any option like directly passing an array of JSON object?
I understand that
but clusterise does not process any data. It requires array of tags in strings, so there aren't other ways of providing data except ['
You need to find a way to convert your json in non-blocking way, for example partially by "chunks" using setTimeout loop
Hi, I wanted to use the clusterize.update method but couldn't get it working. How does clusterize know how to format the html based on the objects in the Json data?