Skip to content

Commit 6c2c657

Browse files
igdmdimitrovradomirchevkdinevgedinakova
authored
fix(excel-style-filtering): reset filter value (#15090)
* fix(esf): show filters based on column name * fix(esf-custom-dialog): filter expressionsList by column name * chore(*): revert changes after branch retarget --------- Co-authored-by: RadoMirchev <[email protected]> Co-authored-by: Konstantin Dinev <[email protected]> Co-authored-by: Galina Edinakova <[email protected]>
1 parent 4870b88 commit 6c2c657

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-conditional-filter.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class IgxExcelStyleConditionalFilterComponent implements OnDestroy {
4040
public subMenu: IgxDropDownComponent;
4141

4242
protected get filterNumber() {
43-
return this.esf.expressionsList.length;
43+
return this.esf.expressionsList.filter(e => e.expression.condition).length;
4444
}
4545

4646
private shouldOpenSubMenu = true;
@@ -145,6 +145,8 @@ export class IgxExcelStyleConditionalFilterComponent implements OnDestroy {
145145
if (this.esf.expressionsList && this.esf.expressionsList.length &&
146146
this.esf.expressionsList[0].expression.condition.name !== 'in') {
147147
this.customDialog.expressionsList = this.esf.expressionsList;
148+
} else {
149+
this.customDialog.expressionsList = this.customDialog.expressionsList.filter(e => e.expression.fieldName === this.esf.column.field && e.expression.condition);
148150
}
149151

150152
this.customDialog.selectedOperator = eventArgs.newSelection.value;

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-custom-dialog.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import { NgClass, NgIf, NgFor } from '@angular/common';
4545
export class IgxExcelStyleCustomDialogComponent implements AfterViewInit {
4646
@Input()
4747
public expressionsList = new Array<ExpressionUI>();
48+
4849
@Input()
4950
public column: ColumnType;
5051

0 commit comments

Comments
 (0)