Skip to content

Commit e872506

Browse files
MKirovaMKirova
authored andcommitted
Minor fix since if only 1 child exists and it is hidden the parent also hides.
1 parent c1bb468 commit e872506

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
203203
const fieldColumn = parentCols.filter(x => x.header === col.header && !x.columnGroup)[0];
204204
const groupColumn = parentCols.filter(x => x.header === col.header && x.columnGroup)[0];
205205
groupColumn.hidden = newState;
206-
if (!groupColumn.hidden) {
206+
if (!groupColumn.hidden && groupColumn.children.length > 1) {
207207
// column group when shown displays all children, we want to show only groups
208208
const fieldChildren = groupColumn.children.filter(x => !x.columnGroup);
209209
fieldChildren.forEach(fieldChild => {

0 commit comments

Comments
 (0)