Clusterize.js
Clusterize.js copied to clipboard
Is it possible to update Clusterize but keep the previous elements visible?
Assuming I have N rows and I use the search method (from the example), would it be possible to somehow set the irrelevant rows as visible but to start from the 1st active row? e.g
[
{ value: 1, active: true, visible: true },
{ value: 2, active: true, visible: true },
{ value: 3, active: true, visible: true },
{ value: 4, active: true, visible: true },
{ value: 5, active: true, visible: true },
{ value: 6, active: true, visible: true },
{ value: 7, active: true, visible: true }
]
search(4)
[
{ value: 1, active: false, visible: true },
{ value: 2, active: false, visible: true },
{ value: 3, active: false, visible: true },
{ value: 4, active: true, visible: true },
{ value: 5, active: true, visible: true },
{ value: 6, active: true, visible: true },
{ value: 7, active: true, visible: true }
]
Basically I would like to create a way to scroll back after searching.
Thanks, Shaked
I struggled with the same issue on a UL list I wanted to bind a click event on a LI and add class 'active' to it, once scrolling and clusterize renewed the list and going back, the selected LI lost is active state. I found a solution for this, maybe this can help you. Here is my codepen test.
https://codepen.io/pen/vegozV
The one issue I did not get around was when selecting the item and going to another page and coming back to the page with the list, getting/scroll back to the selected event in the large list.
Your codepen test is not there anymore, can you provide what you did?
updated the link...