Skip to content

Commit 28f0ccc

Browse files
authored
Merge branch 'master' into mkirova/change-events
2 parents d311f89 + 452fb71 commit 28f0ccc

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5935,9 +5935,13 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
59355935
(this as any).rootGrid ? (this as any).rootGrid.nativeElement : this.nativeElement;
59365936
this._advancedFilteringOverlaySettings.outlet = this.outletDirective;
59375937

5938-
this._advancedFilteringOverlayId =
5939-
this.overlayService.attach(IgxAdvancedFilteringDialogComponent, this._advancedFilteringOverlaySettings);
5940-
// , this._moduleRef);
5938+
this._advancedFilteringOverlayId = this.overlayService.attach(
5939+
IgxAdvancedFilteringDialogComponent,
5940+
this._advancedFilteringOverlaySettings,
5941+
{
5942+
injector: this.viewRef.injector,
5943+
componentFactoryResolver: this.resolver
5944+
});
59415945
this.overlayService.show(this._advancedFilteringOverlayId, this._advancedFilteringOverlaySettings);
59425946
}
59435947
}

projects/igniteui-angular/src/lib/services/overlay/overlay.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@ export class IgxOverlayService implements OnDestroy {
123123
* Generates Id. Provide this Id when call `show(id, settings?)` method
124124
* @param component Component Type to show in overlay
125125
* @param settings Display settings for the overlay, such as positioning and scroll/close behavior.
126-
* @param moduleRef Optional reference to the NgModule that can resolve the component's factory
126+
* @param moduleRef Optional reference to an object containing Injector and ComponentFactoryResolver
127+
* that can resolve the component's factory
127128
* @returns Id of the created overlay. Valid until `onClosed` is emitted.
128129
*/
129-
attach(component: Type<any>, settings?: OverlaySettings, moduleRef?: NgModuleRef<any>): string;
130-
attach(component: ElementRef | Type<any>, settings?: OverlaySettings, moduleRef?: NgModuleRef<any>): string {
130+
attach(component: Type<any>, settings?: OverlaySettings,
131+
moduleRef?: Pick<NgModuleRef<any>, 'injector' | 'componentFactoryResolver'>): string;
132+
attach(component: ElementRef | Type<any>, settings?: OverlaySettings,
133+
moduleRef?: Pick<NgModuleRef<any>, 'injector' | 'componentFactoryResolver'>): string {
131134
let info: OverlayInfo;
132135
info = this.getOverlayInfo(component, moduleRef);
133136

@@ -330,7 +333,7 @@ export class IgxOverlayService implements OnDestroy {
330333
}
331334
}
332335

333-
private getOverlayInfo(component: any, moduleRef?: NgModuleRef<any>): OverlayInfo {
336+
private getOverlayInfo(component: any, moduleRef?: Pick<NgModuleRef<any>, 'injector' | 'componentFactoryResolver'>): OverlayInfo {
334337
const info: OverlayInfo = { ngZone: this._zone };
335338
if (component instanceof ElementRef) {
336339
info.elementRef = <ElementRef>component;

0 commit comments

Comments
 (0)