You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If items in a virtual list are loaded asynchronously, they don't appear.
What behavior are you expecting?
They should be displayed :)
Steps to reproduce:
Create a virtualScroll list with an empty array
Asyncronously load data into this array
Nothing gets rendered...
What it might be after a brief look at the directive :
The ngDoCheck method only updates the list if _initis true.
ngDoCheck() {
if (this._init) {
this.update(true);
}
}
But this._init is only set to true on the update()method (called by ngAfterContentInit()) IF there are already elements to display. If those elements are loaded after the ngAfterContentInit() is executed, this._init will never be set to true and the items won't be rendered :
update(checkChanges: boolean) {
var self = this;
if (!self._records || !self._records.length) return;
Short description of the problem:
If items in a virtual list are loaded asynchronously, they don't appear.
What behavior are you expecting?
They should be displayed :)
Steps to reproduce:
What it might be after a brief look at the directive :
The
ngDoCheck
method only updates the list if_init
is true.But
this._init
is only set to true on theupdate()
method (called byngAfterContentInit()
) IF there are already elements to display. If those elements are loaded after thengAfterContentInit()
is executed,this._init
will never be set to true and the items won't be rendered :Which Ionic Version?
Ionic V2 beta 4
Plunker that shows an example of your issue
http://plnkr.co/edit/CBSEvKTQEjOhgvaoZb2I?p=preview
The text was updated successfully, but these errors were encountered: