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