diff --git a/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-conditional-filter.component.html b/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-conditional-filter.component.html
index 89fbb46e625..630c7833a15 100644
--- a/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-conditional-filter.component.html
+++ b/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-conditional-filter.component.html
@@ -43,11 +43,4 @@
}
-
-
-
}
diff --git a/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-conditional-filter.component.ts b/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-conditional-filter.component.ts
index 5ed40340e94..67a7d2a5dd4 100644
--- a/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-conditional-filter.component.ts
+++ b/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-conditional-filter.component.ts
@@ -6,7 +6,7 @@ import { BaseFilteringComponent } from './base-filtering.component';
import { NgClass } from '@angular/common';
import { IgxDropDownComponent, IgxDropDownItemComponent, IgxDropDownItemNavigationDirective, ISelectionEventArgs } from 'igniteui-angular/drop-down';
import { IgxIconComponent } from 'igniteui-angular/icon';
-import { AbsoluteScrollStrategy, AutoPositionStrategy, GridColumnDataType, HorizontalAlignment, IFilteringExpression, IFilteringOperation, OverlaySettings, PlatformUtil, VerticalAlignment } from 'igniteui-angular/core';
+import { AbsoluteScrollStrategy, AutoPositionStrategy, ContainerPositionStrategy, GridColumnDataType, HorizontalAlignment, IFilteringExpression, IFilteringOperation, IgxOverlayService, OverlaySettings, PlatformUtil, VerticalAlignment } from 'igniteui-angular/core';
/**
@@ -15,17 +15,12 @@ import { AbsoluteScrollStrategy, AutoPositionStrategy, GridColumnDataType, Horiz
@Component({
selector: 'igx-excel-style-conditional-filter',
templateUrl: './excel-style-conditional-filter.component.html',
- imports: [NgClass, IgxDropDownItemNavigationDirective, IgxIconComponent, IgxDropDownComponent, IgxDropDownItemComponent, IgxExcelStyleCustomDialogComponent]
+ imports: [NgClass, IgxDropDownItemNavigationDirective, IgxIconComponent, IgxDropDownComponent, IgxDropDownItemComponent]
})
export class IgxExcelStyleConditionalFilterComponent implements OnDestroy {
public esf = inject(BaseFilteringComponent);
protected platform = inject(PlatformUtil);
-
- /**
- * @hidden @internal
- */
- @ViewChild('customDialog', { read: IgxExcelStyleCustomDialogComponent })
- public customDialog: IgxExcelStyleCustomDialogComponent;
+ private _overlayService = inject(IgxOverlayService);
/**
* @hidden @internal
@@ -133,20 +128,43 @@ export class IgxExcelStyleConditionalFilterComponent implements OnDestroy {
* @hidden @internal
*/
public onSubMenuSelection(eventArgs: ISelectionEventArgs) {
+ const overlaySettings: OverlaySettings = {
+ modal: false,
+ closeOnOutsideClick: true,
+ positionStrategy: new ContainerPositionStrategy()
+ };
+ const overlayId = this._overlayService.attach(IgxExcelStyleCustomDialogComponent, this.esf.grid.viewRef, overlaySettings);
+ const overlayInfo = this._overlayService.getOverlayById(overlayId);
+ const customDialog = overlayInfo.componentRef.instance as IgxExcelStyleCustomDialogComponent;
+ this.esf.grid.tbody.nativeElement.appendChild(overlayInfo.wrapperElement.parentElement);
+
+ customDialog.esf = this.esf;
+ customDialog.column = this.esf.column;
+ customDialog.filteringService = this.esf.grid.filteringService;
+ customDialog.overlayComponentId = overlayId;
if (this.esf.expressionsList && this.esf.expressionsList.length &&
this.esf.expressionsList[0].expression.condition.name !== 'in') {
- this.customDialog.expressionsList = this.esf.expressionsList;
+ customDialog.expressionsList = this.esf.expressionsList;
} else {
- this.customDialog.expressionsList = this.customDialog.expressionsList.filter(e => e.expression.fieldName === this.esf.column.field && e.expression.condition);
+ customDialog.expressionsList = customDialog.expressionsList.filter(e => e.expression.fieldName === this.esf.column.field && e.expression.condition);
}
+ customDialog.selectedOperator = eventArgs.newSelection.value;
+
+ this._overlayService.opening.pipe(takeUntil(this.destroy$)).subscribe((args) => {
+ if (args.id === overlayId)
+ customDialog.onCustomDialogOpening();
+ });
+ this._overlayService.opened.pipe(takeUntil(this.destroy$)).subscribe((args) => {
+ if (args.id === overlayId)
+ customDialog.onCustomDialogOpened();
+ });
- this.customDialog.selectedOperator = eventArgs.newSelection.value;
eventArgs.cancel = true;
if (this.esf.overlayComponentId) {
this.esf.hide();
}
this.subMenu.close();
- this.customDialog.open(this.esf.mainDropdown.nativeElement);
+ this._overlayService.show(overlayId);
}
/**
diff --git a/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-custom-dialog.component.html b/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-custom-dialog.component.html
index 9998443fd1f..30c47aea6aa 100644
--- a/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-custom-dialog.component.html
+++ b/projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-custom-dialog.component.html
@@ -1,12 +1,10 @@
-
+ (keydown)="onKeyDown($event)">