Skip to content

Commit 8aafb03

Browse files
committed
fix(filter-row): switch to icon buttons when width is below 432px
1 parent 48a1a92 commit 8aafb03

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@
122122
</button>
123123

124124
<div #buttonsContainer class="igx-grid__filtering-row-editing-buttons">
125-
<button igxButton="flat" igxRipple (click)="clearFiltering()" [disabled]="disabled" [tabindex]="disabled">
125+
<button [igxButton]="isNarrowWidth ? 'icon' : 'flat'" igxRipple (click)="clearFiltering()" [disabled]="disabled" [tabindex]="disabled">
126126
<igx-icon>refresh</igx-icon>
127-
{{filteringService.grid.resourceStrings.igx_grid_filter_row_reset}}
127+
{{isNarrowWidth ? '' : filteringService.grid.resourceStrings.igx_grid_filter_row_reset}}
128128
</button>
129-
<button #closeButton igxButton="flat" igxRipple (click)="close()">
129+
<button #closeButton [igxButton]="isNarrowWidth ? 'icon' : 'flat'" igxRipple (click)="close()">
130130
<igx-icon>close</igx-icon>
131-
{{filteringService.grid.resourceStrings.igx_grid_filter_row_close}}
131+
{{isNarrowWidth ? '' : filteringService.grid.resourceStrings.igx_grid_filter_row_close}}
132132
</button>
133133
</div>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,4 +778,8 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
778778
private get isColumnFiltered() {
779779
return this.column.filteringExpressionsTree && this.column.filteringExpressionsTree.filteringOperands.length > 0;
780780
}
781+
782+
public get isNarrowWidth(): boolean {
783+
return this.element.nativeElement.offsetWidth < 432;
784+
}
781785
}

0 commit comments

Comments
 (0)