VirtualScroll is empty after deleting and recreating it


#1

Hi there,

I am using virtualScroll to display a big list of movies. I have a list of filters that recreate the whole list of datas of the virtualscroll. Unfortunately I have never been able to have the whole VS red-drawn properly. the design is a list of 5 columns.

It alsways works great on first draw, but when changing the filters it always fails to display the Vs properly.

So I decided to remove the VS altogether and recreate a new one with *ngIf and a timeout. My directive encapsulating the Vs does get destroyed (ngOnDestroy is properly called). But once redrawn the list of empty (no items are shown), even after a resize. The inner property _init of the VS is false.

I have a plunkr that demonstrate the bug:


(when clicking on ‘reload’ the list displays empty)

If anyone encountered the same problem I would love to get some help…

Thanks