fix(virtual-scroll): create views inside zone

fixes #10451
This commit is contained in:
Manuel Mtz-Almeida
2017-04-19 15:55:12 +02:00
parent 27cb360eac
commit fd3c6baec7
2 changed files with 15 additions and 12 deletions

View File

@ -501,15 +501,17 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
adjustRendered(cells, data);
populateNodeData(
data.topCell, data.bottomCell,
data.viewWidth, true,
cells, records, nodes,
this._itmTmp.viewContainer,
this._itmTmp.templateRef,
this._hdrTmp && this._hdrTmp.templateRef,
this._ftrTmp && this._ftrTmp.templateRef, needClean
);
this._zone.run(() => {
populateNodeData(
data.topCell, data.bottomCell,
data.viewWidth, true,
cells, records, nodes,
this._itmTmp.viewContainer,
this._itmTmp.templateRef,
this._hdrTmp && this._hdrTmp.templateRef,
this._ftrTmp && this._ftrTmp.templateRef, needClean,
);
});
if (needClean) {
this._cd.detectChanges();