@@ -32,7 +32,7 @@ import { VirtualHelperComponent } from './virtual.helper.component';
32
32
import { IgxScrollInertiaModule } from './../scroll-inertia/scroll_inertia.directive' ;
33
33
import { IgxForOfSyncService , IgxForOfScrollSyncService } from './for_of.sync.service' ;
34
34
import { Subject } from 'rxjs' ;
35
- import { takeUntil , filter , throttleTime } from 'rxjs/operators' ;
35
+ import { takeUntil , filter , throttleTime , first } from 'rxjs/operators' ;
36
36
import ResizeObserver from 'resize-observer-polyfill' ;
37
37
import { IBaseEventArgs } from '../../core/utils' ;
38
38
import { VirtualHelperBaseDirective } from './base.helper.component' ;
@@ -746,7 +746,6 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
746
746
const diffs = [ ] ;
747
747
let totalDiff = 0 ;
748
748
const l = this . _embeddedViews . length ;
749
- this . _embeddedViews . filter ( view => ! view . destroyed ) . forEach ( view => view . detectChanges ( ) ) ;
750
749
const rNodes = this . _embeddedViews . map ( view =>
751
750
view . rootNodes . find ( node => node . nodeType === Node . ELEMENT_NODE ) || view . rootNodes [ 0 ] . nextElementSibling ) ;
752
751
for ( let i = 0 ; i < l ; i ++ ) {
@@ -1561,7 +1560,10 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
1561
1560
const scrollOffset = this . fixedUpdateAllElements ( this . _virtScrollTop ) ;
1562
1561
1563
1562
this . dc . instance . _viewContainer . element . nativeElement . style . top = - ( scrollOffset ) + 'px' ;
1564
- this . recalcUpdateSizes ( ) ;
1563
+
1564
+ this . _zone . onStable . pipe ( first ( ) ) . subscribe ( ( ) => {
1565
+ this . recalcUpdateSizes ( ) ;
1566
+ } ) ;
1565
1567
this . cdr . markForCheck ( ) ;
1566
1568
}
1567
1569
0 commit comments