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

Support for offset? #16

Closed babsonmatt closed 9 years ago

babsonmatt commented 9 years ago

It'd be nice to be able to specify an offset to indicate where to start in the list (this would also allow someone to scroll up to previous items)

NeXTs commented 9 years ago

You can specify the offset by simple adding of scrollTop after initialization, clusterize will process the rest.

var clusterize = new Clusterize({
  rows: rows,
  scrollId: 'scrollElemId',
  contentId: 'contentElemId'
});
document.getElementById('scrollElemId').scrollTop = 500;

I could add this as option to plugin on init and it will cost only extra 0.01kb. But I do not want to overload this simple plugin with lot of options.

Question to community - does anybody else thinks I have to add this feature to the plugin?