@@ -432,7 +432,8 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
432
432
writeUpdate ( ) {
433
433
console . debug ( `virtual-scroll, writeUpdate` ) ;
434
434
435
- processRecords ( this . _data . renderHeight ,
435
+ const stopAtHeight = ( ( this . _data . scrollTop || 0 ) + this . _data . renderHeight ) ;
436
+ processRecords ( stopAtHeight ,
436
437
this . _records ,
437
438
this . _cells ,
438
439
this . _hdrFn ,
@@ -458,16 +459,17 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
458
459
const records = this . _records ;
459
460
460
461
// initialize nodes with the correct cell data
461
- data . topCell = 0 ;
462
+ adjustRendered ( cells , data ) ;
462
463
data . bottomCell = ( cells . length - 1 ) ;
463
464
464
- populateNodeData ( 0 , data . bottomCell ,
465
- data . viewWidth , true ,
466
- cells , records , nodes ,
467
- this . _itmTmp . viewContainer ,
468
- this . _itmTmp . templateRef ,
469
- this . _hdrTmp && this . _hdrTmp . templateRef ,
470
- this . _ftrTmp && this . _ftrTmp . templateRef , true ) ;
465
+ populateNodeData ( data . topCell || 0 ,
466
+ data . bottomCell ,
467
+ data . viewWidth , true ,
468
+ cells , records , nodes ,
469
+ this . _itmTmp . viewContainer ,
470
+ this . _itmTmp . templateRef ,
471
+ this . _hdrTmp && this . _hdrTmp . templateRef ,
472
+ this . _ftrTmp && this . _ftrTmp . templateRef , true ) ;
471
473
472
474
// ******** DOM WRITE ****************
473
475
this . _cd . detectChanges ( ) ;
0 commit comments