Skip to content

Commit 8f1c49b

Browse files
authored
Merge pull request #7608 from IgniteUI/mdragnev/group-area-row
feat(igxGrid): Add an input that enable/disable group area row
2 parents ff46d52 + 2b52667 commit 8f1c49b

File tree

6 files changed

+24
-1
lines changed

6 files changed

+24
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Ignite UI for Angular Change Log
22

33
All notable changes for each version of this project will be documented in this file.
4+
## 10.0.0
5+
6+
### New Features
7+
8+
- `IgxGrid`
9+
- `showGroupArea` input is added, which can be used to enable/disable the group area row.
410

511
## 10.0
612

projects/igniteui-angular/src/lib/grids/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Below is the list of all inputs that the developers may set to configure the gri
212212
| `isLoading` | bool | Sets if the grid is waiting for data - default value false. |
213213
| `rowDraggable` | bool | Sets if the grid rows can be dragged |
214214
| `columnSelection` | GridSelectionMode | Sets if the grid columns can be selected |
215+
| `showGroupArea` | boolean | Set/get whether the group are row is shown |
215216

216217
### Outputs
217218

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</igx-grid-toolbar>
44

55
<div [style.flex-basis.px]='outerWidth' class="igx-grid__grouparea"
6-
*ngIf="groupingExpressions.length > 0 || hasGroupableColumns" #groupArea>
6+
*ngIf="showGroupArea && (groupingExpressions.length > 0 || hasGroupableColumns)" #groupArea>
77
<igx-chips-area (onReorder)="chipsOrderChanged($event)" (onMoveEnd)="chipsMovingEnded()">
88
<ng-container *ngFor="let expr of chipsGoupingExpressions; let last = last;">
99
<igx-chip [id]="expr.fieldName" [attr.title]="getGroupByChipTitle(expr)"

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export class IgxGridComponent extends IgxGridBaseDirective implements GridType,
111111
private _data;
112112
private _hideGroupedColumns = false;
113113
private _dropAreaMessage = null;
114+
private _showGroupArea = true;
114115

115116
/**
116117
* Gets/Sets the value of the `id` attribute.
@@ -699,6 +700,14 @@ export class IgxGridComponent extends IgxGridBaseDirective implements GridType,
699700
return this.columnList.some((col) => col.groupable && !col.columnGroup);
700701
}
701702

703+
@Input()
704+
public get showGroupArea(): boolean {
705+
return this._showGroupArea;
706+
}
707+
public set showGroupArea(value: boolean) {
708+
this._showGroupArea = value;
709+
}
710+
702711
private _setGroupColsVisibility(value) {
703712
if (this.columnList.length > 0 && !this.hasColumnLayouts) {
704713
this.groupingExpressions.forEach((expr) => {

src/app/grid-groupby/grid-groupby.sample.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@
2929
<br />
3030
<button igxButton="raised" (click)="toggleDensity()">Toggle density</button>
3131
<div>Current Display Density: {{displayDensityOptions.displayDensity}}</div>
32+
33+
<button igxButton="raised" (click)="hideGroupableRow()">Show/Hide groupable row</button>
3234
</div>

src/app/grid-groupby/grid-groupby.sample.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,9 @@ export class GridGroupBySampleComponent implements OnInit {
145145
public selectSummaryMode(event) {
146146
this.summaryMode = this.summaryModes[event.index].label;
147147
}
148+
149+
public hideGroupableRow() {
150+
this.grid1.showGroupArea = !this.grid1.showGroupArea;
151+
this.grid1.cdr.detectChanges();
152+
}
148153
}

0 commit comments

Comments
 (0)