NeXTs / Clusterize.js

Tiny vanilla JS plugin to display large data sets easily
https://clusterize.js.org
MIT License
7.22k stars 412 forks source link

How to bind data to Clusterized rows? #46

Closed s-a closed 9 years ago

s-a commented 9 years ago

Regarding to #45 I am setting a selected row flag on space key press in the underlying data model and a CSS class of active row DOM element, but I lose the DOM information after (I guess) insertToDOM was fired.

Because it is time critical to update the whole DOM after space press I could need to call .update() without DOM manipulation to refresh selected rows state. I believe that make sense at a point where blocks_in_cluster was reached before insertToDOM acts DOM rendering.

In short what I need could be

.updateData(data) // update data rows without rendering.
.beforeDOMUpdate() // event that fires when blocks_in_cluster was reached.

What do you think?

s-a commented 9 years ago

I think afterDomUpdate event would be helpfull to update the DOM regarding the underlying data model.

NeXTs commented 9 years ago

Hi, you are able to fork and extend plugin's sources as you wish. It's pretty simple and may be changed easily. Feature you've requested seems like 'individual need', as for me.

I'm glad that you were able to change the source code to fit your needs but sorry I will not accept your pull request at this moment. In the nearest future I will implement list of callbacks and events for most useful needs.

s-a commented 9 years ago

:+1: can you create an issue for that so that we can subscribe notifications?

NeXTs commented 9 years ago

@s-a here it is https://github.com/NeXTs/Clusterize.js/issues/48