Skip to content

Commit 4b8e80d

Browse files
committed
fix(filtering): Fix issue when switch conditions #6519
1 parent 1bbe8a7 commit 4b8e80d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,8 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
654654

655655
// TODO: revise the cdr.detectChanges() usage here
656656
if (!(this.cdr as ViewRef).destroyed) {
657-
this.cdr.detectChanges(); }
657+
this.cdr.detectChanges();
658+
}
658659
}
659660
});
660661
}
@@ -765,7 +766,13 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
765766
}
766767

767768
private conditionChangedCallback() {
768-
if (!this.expression.searchVal || this.expression.searchVal === 0) {
769+
if (this.expressionsList.length > 0 && !this.expression.searchVal && !this.expression.condition.isUnary) {
770+
const selectedItem = this.expressionsList.find(ex => ex.isSelected === true);
771+
if (selectedItem) {
772+
this.value = null;
773+
}
774+
}
775+
if (!!this.expression.searchVal || this.expression.searchVal === 0) {
769776
this.filter();
770777
} else if (this.value) {
771778
this.value = null;

0 commit comments

Comments
 (0)