Merge branch 'feature/fixVirtualScrollDissapearing' of https://github.com/masimplo/ionic into fix-virtual-list2

This commit is contained in:
Manu Mtz.-Almeida
2017-03-15 17:11:14 +01:00

View File

@ -432,7 +432,8 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
writeUpdate() { writeUpdate() {
console.debug(`virtual-scroll, writeUpdate`); console.debug(`virtual-scroll, writeUpdate`);
processRecords(this._data.renderHeight, const stopAtHeight = ((this._data.scrollTop || 0) + this._data.renderHeight);
processRecords(stopAtHeight,
this._records, this._records,
this._cells, this._cells,
this._hdrFn, this._hdrFn,
@ -458,10 +459,11 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
const records = this._records; const records = this._records;
// initialize nodes with the correct cell data // initialize nodes with the correct cell data
data.topCell = 0; adjustRendered(cells, data);
data.bottomCell = (cells.length - 1); data.bottomCell = (cells.length - 1);
populateNodeData(0, data.bottomCell, populateNodeData(data.topCell || 0,
data.bottomCell,
data.viewWidth, true, data.viewWidth, true,
cells, records, nodes, cells, records, nodes,
this._itmTmp.viewContainer, this._itmTmp.viewContainer,