Skip to content

Commit 094aa7c

Browse files
committed
refactor(excel-filter): use condition friendly name
1 parent 23688ce commit 094aa7c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-default-expression.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<igx-icon *ngIf="expressionUI.expression.condition" family="imx-icons" [name]="getIconName()"></igx-icon>
99
<igx-icon *ngIf="!expressionUI.expression.condition">filter_list</igx-icon>
1010
</igx-prefix>
11-
<igx-select-item *ngFor="let condition of conditions" [value]="condition" [selected]="isConditionSelected(condition)">
11+
<igx-select-item *ngFor="let condition of conditions" [value]="condition" [text]="getConditionFriendlyName(condition)" [selected]="isConditionSelected(condition)">
1212
<div class="igx-grid__filtering-dropdown-items">
1313
<igx-icon family="imx-icons" [name]="getCondition(condition).iconName"></igx-icon>
1414
<span class="igx-grid__filtering-dropdown-text">{{translateCondition(condition)}}</span>

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-default-expression.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ export class IgxExcelStyleDefaultExpressionComponent implements AfterViewInit {
155155
return this.column.filters.condition(value);
156156
}
157157

158+
public getConditionFriendlyName(name: string): string {
159+
return this.grid.resourceStrings[`igx_grid_filter_${name}`] || name;
160+
}
161+
158162
public onValuesInput(eventArgs) {
159163
this.expressionUI.expression.searchVal = DataUtil.parseValue(this.column.dataType, eventArgs.target.value);
160164
}

0 commit comments

Comments
 (0)