Skip to content

Commit

Permalink
fix(VirtualScroll): stop from resizing while out of view (#13143)
Browse files Browse the repository at this point in the history
  • Loading branch information
masimplo authored and manucorporat committed Oct 27, 2017
1 parent e7ac15f commit 6978bb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/virtual-scroll/virtual-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,11 @@ export class VirtualScroll implements DoCheck, OnChanges, AfterContentInit, OnDe
return;
}

// check if component is rendered in the dom currently
if (this._elementRef.nativeElement.offsetParent === null) {
return;
}

console.debug('virtual-scroll', 'resized window');
this.calcDimensions();
this.writeUpdate(false);
Expand Down

0 comments on commit 6978bb5

Please sign in to comment.