lineupjs icon indicating copy to clipboard operation
lineupjs copied to clipboard

Load and show more data rows on demand

Open thinkh opened this issue 4 years ago • 1 comments

Sometimes the whole dataset with all rows isn't available with the initial load, but more rows should be added loaded on demand. Loading of more rows (in chunks) could be triggered when scrolling to the bottom or an external event (e.g., button click). The new rows should be added to the data provider. Sorting, mapping, etc. should be applied to the whole (i.e., updated) dataset. Afterwards the visualization should be updated. Probably the scroll position should be fixed (and not jump to the top). However, that must be tested.

Maybe #185 provides already some implementation for this request, but we don't know what it contains and how it works.

thinkh avatar Jan 14 '20 10:01 thinkh

#185 is implementing an approach in which the sorting / filtering / ... is externalized and e.g. done by a server. In the end, one has to implement:

https://github.com/lineupjs/lineupjs/blob/b87ff4704c6fa4e1d2febe5930fc618c435cd4fa/src/provider/remote/interfaces.ts#L79-L129

Sorting, mapping, etc. should be applied to the whole (i.e., updated) dataset.

which means in that it can happen that when I click the load more button and I'm viewing ranks 900 to 1000, suddenly a new top 1 will appear. However, since the scrolling position is the same, one will never notice

sgratzl avatar Jan 21 '20 15:01 sgratzl