Skip to content

Commit c908e46

Browse files
committed
fix(filtering): Fixing the dateTime column filtering #5627
1 parent 40c676e commit c908e46

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
(onSelection)="onDateSelected($event)"
5151
(onClose)="datePickerClose()">
5252
<ng-template igxDatePickerTemplate let-openDialog="openDialog">
53-
<igx-input-group #dropDownTarget type="box" [displayDensity]="'compact'" [supressInputAutofocus]="true" (focusout)="onInputGroupFocusout()">
53+
<igx-input-group #inputGroup type="box" [displayDensity]="'compact'" [supressInputAutofocus]="true" (focusout)="onInputGroupFocusout()">
5454
<igx-prefix #inputGroupPrefix
5555
tabindex="0"
5656
(click)="toggleConditionsDropDown(inputGroupPrefix)"
@@ -61,7 +61,7 @@
6161
<input #input
6262
igxInput
6363
tabindex="0"
64-
(click)="expression.condition.isUnary ? noop() : openDialog(dropDownTarget.element.nativeElement)"
64+
(click)="expression.condition.isUnary ? noop() : openDialog(inputGroup.element.nativeElement)"
6565
[placeholder]="placeholder"
6666
autocomplete="off"
6767
[value]="value | igxdate: filteringService.grid.locale"

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
129129
@ViewChild('inputGroup', { read: ElementRef, static: false })
130130
protected inputGroup: ElementRef;
131131

132-
@ViewChild('dropDownTarget', { read: ElementRef, static: false })
133-
protected inputGroupDate: ElementRef;
134-
135132
@ViewChild('inputGroupPrefix', { read: ElementRef, static: false })
136133
protected inputGroupPrefix: ElementRef;
137134

@@ -449,9 +446,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
449446
if (focusedElement.className === 'igx-chip__remove') {
450447
return;
451448
}
452-
if (!(focusedElement &&
453-
(this.inputGroup !== undefined ? this.inputGroup.nativeElement.contains(focusedElement) :
454-
this.inputGroupDate.nativeElement.contains(focusedElement)))
449+
if (!(focusedElement && this.inputGroup.nativeElement.contains(focusedElement))
455450
&& this.dropDownConditions.collapsed) {
456451
this.commitInput();
457452
}
@@ -490,7 +485,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
490485
/*
491486
* noop
492487
*/
493-
public noop() {}
488+
public noop() { }
494489

495490
/**
496491
* Event handler for date picker's selection.
@@ -541,8 +536,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
541536
public onChipPointerdown(args, chip: IgxChipComponent) {
542537
const activeElement = document.activeElement;
543538
this._cancelChipClick = chip.selected && activeElement &&
544-
(this.inputGroup !== undefined ? this.inputGroup.nativeElement.contains(activeElement) :
545-
this.inputGroupDate.nativeElement.contains(activeElement));
539+
this.inputGroup.nativeElement.contains(activeElement);
546540
}
547541

548542
public onChipClick(args, item: ExpressionUI) {

0 commit comments

Comments
 (0)