@@ -16,7 +16,7 @@ import { IgxTextHighlightDirective } from '../directives/text-highlight/text-hig
16
16
import { IgxGridAPIService } from './api.service' ;
17
17
import { IgxGridCellComponent } from './cell.component' ;
18
18
import { IgxDateSummaryOperand , IgxNumberSummaryOperand , IgxSummaryOperand , IgxSummaryResult } from './grid-summary' ;
19
- import { IgxGridSummaryComponent } from './grid-summary .component' ;
19
+ import { IgxGridRowComponent } from './row .component' ;
20
20
import {
21
21
IgxCellEditorTemplateDirective ,
22
22
IgxCellFooterTemplateDirective ,
@@ -228,16 +228,19 @@ export class IgxColumnComponent implements AfterContentInit {
228
228
}
229
229
230
230
get cells ( ) : IgxGridCellComponent [ ] {
231
- return this . grid . rowList . map ( ( row ) => row . cells . filter ( ( cell ) => cell . columnIndex === this . index ) )
232
- . reduce ( ( a , b ) => a . concat ( b ) , [ ] ) ;
231
+ return this . grid . rowList . filter ( ( row ) => row instanceof IgxGridRowComponent )
232
+ . map ( ( row ) => row . cells . filter ( ( cell ) => cell . columnIndex === this . index ) )
233
+ . reduce ( ( a , b ) => a . concat ( b ) , [ ] ) ;
233
234
}
234
235
235
236
get visibleIndex ( ) : number {
236
237
const grid = this . gridAPI . get ( this . gridID ) ;
237
238
let vIndex = - 1 ;
239
+
238
240
if ( this . columnGroup ) {
239
241
return vIndex ;
240
242
}
243
+
241
244
if ( ! this . pinned ) {
242
245
const indexInCollection = grid . unpinnedColumns . indexOf ( this ) ;
243
246
vIndex = indexInCollection === - 1 ? - 1 : grid . pinnedColumns . length + indexInCollection ;
@@ -502,7 +505,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
502
505
503
506
@Input ( )
504
507
get hidden ( ) {
505
- return this . _hidden ;
508
+ return this . allChildren . every ( c => c . hidden ) ;
506
509
}
507
510
508
511
set hidden ( value : boolean ) {
@@ -537,8 +540,8 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
537
540
}
538
541
539
542
540
- function flatten ( arr : any [ ] ) {
541
543
544
+ function flatten ( arr : any [ ] ) {
542
545
let result = [ ] ;
543
546
544
547
arr . forEach ( el => {
0 commit comments