Skip to content

Commit cd09250

Browse files
committed
chore(*): update selected property for column group
1 parent baa6815 commit cd09250

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

projects/igniteui-angular/src/lib/grids/columns/column-group.component.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
137137
public get selectable(): boolean {
138138
return this.children && this.children.some(child => child.selectable);
139139
}
140-
/**
141-
* Enable/disable the selection of the column group.
142-
* Groups gets the selectable property from their children
143-
* @memberof IgxColumnGroupComponent
144-
*/
145-
public set selectable(value: boolean) {}
146140

147141
/**
148142
* Returns a reference to the body template.
@@ -239,7 +233,8 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
239233
* @memberof IgxColumnGroupComponent
240234
*/
241235
get selected(): boolean {
242-
return this.selectable && this.children.toArray().every(c => !c.selectable || c.selected);
236+
const selectableChildren = this.children.filter(c => c.selectable && !c.hidden);
237+
return selectableChildren.length > 0 && selectableChildren.every(c => c.selected);
243238
}
244239

245240
/**

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ export class IgxGridHeaderGroupComponent implements DoCheck {
226226
* @hidden
227227
*/
228228
get selected() {
229-
const selectableChildren = this.getSelectableChildren(this.column.children.toArray());
230-
return selectableChildren.length > 0 && selectableChildren.every(c => c.selected);
229+
return this.column.selected;
231230
}
232231

233232
/**

0 commit comments

Comments
 (0)