Should I use virtualScroll

Hi,

I am building an app with a massive list of obejcts.
Unfortunately, I need to call an RPC method on a server to retrieve parts of this list. BUT, I retrieve the number of total items.
I was thinking of providing first a list of ‘empty’ items and then as the user is scrolling make the RPC calls to retrieve the datas needed to be displayed. I implemented that on ionic 1 with collection-repeat and a IOS plugin I made, and I was expecting to be able to only use IONIC this time.

I was thinking using infinite scroll, but I have some doubts:

  • I don’t seem to be able to retrieve a ‘scroll’ event to know the position of the virtualScroll
  • Change some part of the dataset while scrolling ‘might’ reload the whole list, which would be pretty bad

Anyone can give me some feedback on that? Should I abandon the ionic pass and go back to an IOS plugin? Is there another way to retrieve the scroll event? Another plug in maybe?

Thanks

For information I found this plugin that might do the trick:
http://rintoj.github.io/angular2-virtual-scroll/#demo

if you load all data items at once
then use Virtual Scroll

but if you load the data part by part use Infinite Scroll

take a look at the links they have what you need.


I already looked at that thouroughly.
I would need a mix between virtual-scroll and infinitescroll. I’ll see what I can do and post the solution here…

Thanks.

i tried using both together, they didn’t go nicely together, well maybe your experience will be different,
good luck.

Yeah I don’t think it would work out of the box.
A good use case would be to fill the “items” with empty/generic content and having infinity-scroll to be trigger after having scrolled X, so the remote service an call some datas and then replace the recived data in the items obect, without having to resize it, which is rebuilding the whole virtualscroll…

I am looking into this:
http://rintoj.github.io/angular2-virtual-scroll/#demo

as a replacement. At least we have some stuff triggered while scrolling…