File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed
Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ export class IgxGridHeaderGroupComponent implements DoCheck {
216216 * @hidden
217217 */
218218 get selectable ( ) {
219- const selectableChildren = this . getSelectableChildren ( this . column . children . toArray ( ) ) ;
219+ const selectableChildren = this . column . allChildren . filter ( c => ! c . hidden && c . selectable && ! c . columnGroup ) ;
220220 return this . grid . columnSelection !== 'none' &&
221221 this . column . applySelectableClass
222222 && ! this . selected && selectableChildren . length > 0
@@ -248,7 +248,7 @@ export class IgxGridHeaderGroupComponent implements DoCheck {
248248 * @hidden
249249 */
250250 public groupClicked ( event ) : void {
251- const columnsToSelect = this . getSelectableChildren ( this . column . children . toArray ( ) ) . map ( c => c . field ) ;
251+ const columnsToSelect = this . column . allChildren . filter ( c => ! c . hidden && c . selectable && ! c . columnGroup ) . map ( c => c . field ) ;
252252 if ( this . grid . columnSelection !== 'none' && columnsToSelect . length > 0 && ! this . grid . filteringService . isFilterRowVisible ) {
253253 const clearSelection = this . grid . columnSelection === 'single' || ! event . ctrlKey ;
254254 const rangeSelection = this . grid . columnSelection === 'multiple' && event . shiftKey ;
@@ -266,20 +266,6 @@ export class IgxGridHeaderGroupComponent implements DoCheck {
266266 }
267267 }
268268
269- private getSelectableChildren ( children : IgxColumnComponent [ ] ) : IgxColumnComponent [ ] {
270- let result : IgxColumnComponent [ ] = [ ] ;
271- children . forEach ( el => {
272- if ( el . selectable && ! el . hidden ) {
273- if ( el . children && el . columnGroup ) {
274- result = result . concat ( this . getSelectableChildren ( el . children . toArray ( ) ) ) ;
275- } else {
276- result . push ( el ) ;
277- }
278- }
279- } ) ;
280- return result ;
281- }
282-
283269 /**
284270 * @hidden
285271 */
You can’t perform that action at this time.
0 commit comments