Clusterize.js icon indicating copy to clipboard operation
Clusterize.js copied to clipboard

Is it possible to update Clusterize but keep the previous elements visible?

Open Shaked opened this issue 7 years ago • 3 comments

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

Shaked avatar Aug 24 '17 18:08 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.

PlippiePlop avatar Oct 03 '17 10:10 PlippiePlop

Your codepen test is not there anymore, can you provide what you did?

shakunvohra avatar Oct 02 '18 02:10 shakunvohra

updated the link...

PlippiePlop avatar Oct 02 '18 12:10 PlippiePlop