fix(virtualScroll): load async data

Closes #6124
This commit is contained in:
Adam Bradley
2016-04-12 07:46:47 -05:00
parent e21c4d5927
commit 16a283efe7
2 changed files with 3 additions and 5 deletions

View File

@@ -11,10 +11,9 @@ class E2EPage {
@ViewChild('content') content: ElementRef;
constructor() {
for (var i = 0; i < 14; i++) {
for (var i = 0; i < 200; i++) {
this.items.push(i);
}
}
headerFn(record: any, index: number, records: any[]) {

View File

@@ -334,6 +334,8 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
throw 'virtualItem required within virtualScroll';
}
this._init = true;
this.update(true);
this._platform.onResize(() => {
@@ -398,9 +400,6 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
// ******** DOM READ ****************
readDimensions(function() {
// we were able to read good DOM dimension data, let's do this!
self._init = true;
processRecords(self._data.renderHeight,
self._records,
self._cells,