Skip to content

Commit 59ec60b

Browse files
committed
fix(IgxGrid): fix overlay warnings thrown on scroll #7678
1 parent f22fc60 commit 59ec60b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -3162,7 +3162,9 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
31623162
*/
31633163
public hideOverlays() {
31643164
this.overlayIDs.forEach(overlayID => {
3165-
this.overlayService.detach(overlayID);
3165+
if (this.overlayService.getOverlayById(overlayID)?.visible) {
3166+
this.overlayService.hide(overlayID);
3167+
}
31663168
this.nativeElement.focus();
31673169
});
31683170
}
@@ -3635,6 +3637,13 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
36353637
this.overlayService.detach(this._advancedFilteringOverlayId);
36363638
}
36373639

3640+
this.overlayIDs.forEach(overlayID => {
3641+
if (this.overlayService.getOverlayById(overlayID) && !this.overlayService.getOverlayById(overlayID).detached) {
3642+
this.overlayService.detach(overlayID);
3643+
}
3644+
this.nativeElement.focus();
3645+
});
3646+
36383647
this.zone.runOutsideAngular(() => {
36393648
this.observer.disconnect();
36403649
this.verticalScrollContainer?.getScroll()?.removeEventListener('scroll', this.verticalScrollHandler);

0 commit comments

Comments
 (0)