mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
@ -501,6 +501,7 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
|
||||
|
||||
adjustRendered(cells, data);
|
||||
|
||||
this._zone.run(() => {
|
||||
populateNodeData(
|
||||
data.topCell, data.bottomCell,
|
||||
data.viewWidth, true,
|
||||
@ -508,8 +509,9 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
|
||||
this._itmTmp.viewContainer,
|
||||
this._itmTmp.templateRef,
|
||||
this._hdrTmp && this._hdrTmp.templateRef,
|
||||
this._ftrTmp && this._ftrTmp.templateRef, needClean
|
||||
this._ftrTmp && this._ftrTmp.templateRef, needClean,
|
||||
);
|
||||
});
|
||||
|
||||
if (needClean) {
|
||||
this._cd.detectChanges();
|
||||
|
@ -233,9 +233,10 @@ export function populateNodeData(startCellIndex: number, endCellIndex: number, v
|
||||
availableNode.cell = cellIndex;
|
||||
|
||||
// apply the cell's data to this node
|
||||
availableNode.view.context.$implicit = cell.data || records[cell.record];
|
||||
availableNode.view.context.index = cellIndex;
|
||||
availableNode.view.context.count = recordsLength;
|
||||
var context = availableNode.view.context;
|
||||
context.$implicit = cell.data || records[cell.record];
|
||||
context.index = cellIndex;
|
||||
context.count = recordsLength;
|
||||
availableNode.hasChanges = true;
|
||||
availableNode.lastTransform = null;
|
||||
hasChanges = true;
|
||||
|
Reference in New Issue
Block a user