Skip to content

Commit 97ff01d

Browse files
MKirovaMKirova
authored andcommitted
Update default column expand/collapse icons to match the rows.
1 parent b6eb4c2 commit 97ff01d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
<div class="igx-grid__tr--header">
120120
<igx-icon [attr.draggable]="false"
121121
(click)="toggleColumn(column)">
122-
{{columnGroupStates.get(column.field) ? 'expand_more' : 'expand_less'}}</igx-icon>
122+
{{getColumnGroupExpandState(column) ? 'chevron_right' : 'expand_more'}}</igx-icon>
123123
{{column.header}}
124124
</div>
125125
</ng-template>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,12 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
905905
return this.calcHeight;
906906
}
907907

908+
public getColumnGroupExpandState(col: IgxColumnComponent) {
909+
const state = this.columnGroupStates.get(col.field);
910+
// columns are expanded by default?
911+
return state !== undefined && state !== null ? state : false;
912+
}
913+
908914
public toggleRowGroup(col: IgxColumnComponent, newState: boolean) {
909915
if (this.hasMultipleValues) {
910916
const parentCols = col.parent ? col.parent.children.toArray() : this.columns.filter(x => x.level === 0);

0 commit comments

Comments
 (0)