Skip to content

Commit 5723015

Browse files
committed
feat(adv-filtering): fix condition select target setting #5496
1 parent e20eed9 commit 5723015

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

projects/igniteui-angular/src/lib/grids/filtering/advanced-filtering/advanced-filtering-dialog.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ <h6 class="igx-filter-empty__title">
156156
type="box"
157157
[displayDensity]="'compact'"
158158
[overlaySettings]="conditionSelectOverlaySettings"
159+
(onOpening)="onConditionSelectOpening()"
159160
[placeholder]="grid.resourceStrings.igx_grid_filter_condition_placeholder"
160161
[(ngModel)]="selectedCondition"
161162
[disabled]="!selectedColumn">

projects/igniteui-angular/src/lib/grids/filtering/advanced-filtering/advanced-filtering-dialog.component.ts

+5-12
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,7 @@ export class IgxAdvancedFilteringDialogComponent implements AfterViewInit, OnDes
124124
public columnSelect: IgxSelectComponent;
125125

126126
@ViewChild('conditionSelect', { read: IgxSelectComponent, static: false })
127-
public set conditionSelect(value: IgxSelectComponent) {
128-
if ((value && !this._conditionSelect) ||
129-
(value && this._conditionSelect && this._conditionSelect.element !== value.element)) {
130-
this.conditionSelectOverlaySettings.positionStrategy.settings.target = value.element;
131-
}
132-
this._conditionSelect = value;
133-
}
134-
135-
public get conditionSelect() {
136-
return this._conditionSelect;
137-
}
127+
public conditionSelect: IgxSelectComponent;
138128

139129
@ViewChild('searchValueInput', { read: ElementRef, static: false })
140130
public searchValueInput: ElementRef;
@@ -213,7 +203,6 @@ export class IgxAdvancedFilteringDialogComponent implements AfterViewInit, OnDes
213203
private _clickTimer;
214204
private _dblClickDelay = 200;
215205
private _preventChipClick = false;
216-
private _conditionSelect: IgxSelectComponent;
217206
private _editingInputsContainer: ElementRef;
218207
private _addModeContainer: ElementRef;
219208
private _currentGroupButtonsContainer: ElementRef;
@@ -787,6 +776,10 @@ export class IgxAdvancedFilteringDialogComponent implements AfterViewInit, OnDes
787776
event.preventDefault();
788777
}
789778

779+
public onConditionSelectOpening() {
780+
this.conditionSelectOverlaySettings.positionStrategy.settings.target = this.conditionSelect.element;
781+
}
782+
790783
public initialize(filteringService: IgxFilteringService, overlayService: IgxOverlayService,
791784
overlayComponentId: string) {
792785
this.filteringService = filteringService;

0 commit comments

Comments
 (0)