@@ -6,7 +6,7 @@ import { BaseFilteringComponent } from './base-filtering.component';
66import { NgClass } from '@angular/common' ;
77import { IgxDropDownComponent , IgxDropDownItemComponent , IgxDropDownItemNavigationDirective , ISelectionEventArgs } from 'igniteui-angular/drop-down' ;
88import { IgxIconComponent } from 'igniteui-angular/icon' ;
9- import { AbsoluteScrollStrategy , AutoPositionStrategy , ContainerPositionStrategy , GridColumnDataType , HorizontalAlignment , IFilteringExpression , IFilteringOperation , IgxOverlayService , OverlaySettings , PlatformUtil , VerticalAlignment } from 'igniteui-angular/core' ;
9+ import { AbsoluteScrollStrategy , AutoPositionStrategy , GridColumnDataType , HorizontalAlignment , IFilteringExpression , IFilteringOperation , IgxOverlayService , OverlaySettings , PlatformUtil , PositionSettings , VerticalAlignment } from 'igniteui-angular/core' ;
1010
1111
1212/**
@@ -128,22 +128,29 @@ export class IgxExcelStyleConditionalFilterComponent implements OnDestroy {
128128 * @hidden @internal
129129 */
130130 public onSubMenuSelection ( eventArgs : ISelectionEventArgs ) {
131+ const positionSettings : PositionSettings = {
132+ horizontalDirection : HorizontalAlignment . Center ,
133+ verticalDirection : VerticalAlignment . Middle ,
134+ horizontalStartPoint : HorizontalAlignment . Center ,
135+ verticalStartPoint : VerticalAlignment . Middle
136+ } ;
131137 const overlaySettings : OverlaySettings = {
138+ target : this . esf . grid . tbody . nativeElement ,
132139 modal : false ,
133140 closeOnOutsideClick : true ,
134- positionStrategy : new ContainerPositionStrategy ( )
141+ positionStrategy : new AutoPositionStrategy ( positionSettings ) ,
142+ scrollStrategy : new AbsoluteScrollStrategy ( ) ,
135143 } ;
136- const overlayId = this . _overlayService . attach ( IgxExcelStyleCustomDialogComponent , this . esf . grid . viewRef , overlaySettings ) ;
144+ const overlayId = this . _overlayService . attach ( IgxExcelStyleCustomDialogComponent , this . esf . grid . bodyViewContainerRef , overlaySettings ) ;
137145 const overlayInfo = this . _overlayService . getOverlayById ( overlayId ) ;
138- const customDialog = overlayInfo . componentRef . instance as IgxExcelStyleCustomDialogComponent ;
139- this . esf . grid . tbody . nativeElement . appendChild ( overlayInfo . wrapperElement . parentElement ) ;
146+ const customDialog = overlayInfo . componentRef ! . instance as IgxExcelStyleCustomDialogComponent ;
140147
141148 customDialog . esf = this . esf ;
142149 customDialog . column = this . esf . column ;
143150 customDialog . filteringService = this . esf . grid . filteringService ;
144151 customDialog . overlayComponentId = overlayId ;
145152 if ( this . esf . expressionsList && this . esf . expressionsList . length &&
146- this . esf . expressionsList [ 0 ] . expression . condition . name !== 'in' ) {
153+ this . esf . expressionsList [ 0 ] . expression . condition ? .name !== 'in' ) {
147154 customDialog . expressionsList = this . esf . expressionsList ;
148155 } else {
149156 customDialog . expressionsList = customDialog . expressionsList . filter ( e => e . expression . fieldName === this . esf . column . field && e . expression . condition ) ;
0 commit comments