@@ -109,15 +109,16 @@ export class IgxColumnComponent implements AfterContentInit {
109109
110110    @Input ( ) 
111111    get  index ( ) : number  { 
112-         return  this . _index ; 
112+         return  this . grid . columns . indexOf ( this ) ; 
113+         // return this._index; 
113114    } 
114115
115-     set  index ( value : number )  { 
116-         if  ( this . _index  !==  value )  { 
117-             this . _index  =  value ; 
118-             this . check ( ) ; 
119-         } 
120-     } 
116+     //  set index(value: number) {
117+     //      if (this._index !== value) {
118+     //          this._index = value;
119+     //          this.check();
120+     //      }
121+     //  }
121122
122123    @Input ( ) 
123124    public  formatter : ( value : any )  =>  any ; 
@@ -226,6 +227,9 @@ export class IgxColumnComponent implements AfterContentInit {
226227    get  visibleIndex ( ) : number  { 
227228        const  grid  =  this . gridAPI . get ( this . gridID ) ; 
228229        let  vIndex  =  - 1 ; 
230+         if  ( this . columnGroup )  { 
231+             return  vIndex ; 
232+         } 
229233        if  ( ! this . pinned )  { 
230234            const  indexInCollection  =  grid . unpinnedColumns . indexOf ( this ) ; 
231235            vIndex  =  indexInCollection  ===  - 1  ? - 1  : grid . pinnedColumns . length  +  indexInCollection ; 
@@ -239,6 +243,10 @@ export class IgxColumnComponent implements AfterContentInit {
239243        return  false ; 
240244    } 
241245
246+     get  allChildren ( ) : IgxColumnComponent [ ]  { 
247+         return  [ ] ; 
248+     } 
249+ 
242250    get  level ( )  { 
243251        let  ptr  =  this . parent ; 
244252        let  lvl  =  0 ; 
@@ -263,7 +271,7 @@ export class IgxColumnComponent implements AfterContentInit {
263271    protected  _hidden  =  false ; 
264272    protected  _index : number ; 
265273
266-     private  _defaultMinWidth  =  '88' ; 
274+     protected  _defaultMinWidth  =  '88' ; 
267275
268276    @ContentChild ( IgxCellTemplateDirective ,  {  read : IgxCellTemplateDirective  } ) 
269277    protected  cellTemplate : IgxCellTemplateDirective ; 
@@ -344,7 +352,7 @@ export class IgxColumnComponent implements AfterContentInit {
344352        // should be moved as a event parameter. 
345353
346354        if  ( this . parent  &&  ! this . parent . pinned )  { 
347-             this . topLevelParent ( this ) . pinned  =  true ; 
355+             this . topLevelParent . pinned  =  true ; 
348356            return ; 
349357        } 
350358
@@ -380,7 +388,7 @@ export class IgxColumnComponent implements AfterContentInit {
380388
381389    protected  _unpinColumn ( )  { 
382390        if  ( this . parent  &&  this . parent . pinned )  { 
383-             this . topLevelParent ( this ) . pinned  =  false ; 
391+             this . topLevelParent . pinned  =  false ; 
384392            return ; 
385393        } 
386394
@@ -402,8 +410,8 @@ export class IgxColumnComponent implements AfterContentInit {
402410        this . updateHighlights ( oldIndex ,  newIndex ) ; 
403411    } 
404412
405-     public  topLevelParent ( column :  IgxColumnComponent )  { 
406-         let  parent  =  column . parent ; 
413+     get  topLevelParent ( )  { 
414+         let  parent  =  this . parent ; 
407415        while  ( parent  &&  parent . parent )  { 
408416            parent  =  parent . parent ; 
409417        } 
@@ -430,6 +438,53 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
430438    @ContentChildren ( IgxColumnComponent ,  {  read : IgxColumnComponent  } ) 
431439    children  =  new  QueryList < IgxColumnComponent > ( ) ; 
432440
441+     @Input ( ) 
442+     public  get  summaries ( ) : any  { 
443+         return  this . _summaries ; 
444+     } 
445+ 
446+     public  set  summaries ( classRef : any )  { } 
447+ 
448+     @Input ( ) 
449+     public  searchable  =  true ; 
450+ 
451+     @Input ( ) 
452+     public  get  filters ( ) : any  { 
453+         return  this . _filters ; 
454+     } 
455+     public  set  filters ( classRef : any )  { } 
456+ 
457+     get  defaultMinWidth ( ) : string  { 
458+         return  this . _defaultMinWidth ; 
459+     } 
460+ 
461+     get  bodyTemplate ( ) : TemplateRef < any >  { 
462+         return  this . _bodyTemplate ; 
463+     } 
464+ 
465+     set  bodyTemplate ( template : TemplateRef < any > )  { } 
466+ 
467+     get  headerTemplate ( ) : TemplateRef < any >  { 
468+         return  this . _headerTemplate ; 
469+     } 
470+ 
471+     set  headerTemplate ( template : TemplateRef < any > )  { } 
472+ 
473+     get  footerTemplate ( ) : TemplateRef < any >  { 
474+         return  this . _headerTemplate ; 
475+     } 
476+ 
477+     set  footerTemplate ( template : TemplateRef < any > )  { } 
478+ 
479+     get  inlineEditorTemplate ( ) : TemplateRef < any >  { 
480+         return  this . _inlineEditorTemplate ; 
481+     } 
482+ 
483+     set  inlineEditorTemplate ( template : TemplateRef < any > )  { } 
484+ 
485+     get  cells ( ) : IgxGridCellComponent [ ]  { 
486+         return  [ ] ; 
487+     } 
433488
434489    @Input ( ) 
435490    get  hidden ( )  { 
@@ -452,6 +507,10 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
452507        } ) ; 
453508    } 
454509
510+     get  allChildren ( ) : IgxColumnComponent [ ]  { 
511+         return  flatten ( this . children . toArray ( ) ) ; 
512+     } 
513+ 
455514    get  columnGroup ( )  { 
456515        return  true ; 
457516    } 
@@ -462,3 +521,8 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
462521
463522    set  width ( val )  { } 
464523} 
524+ 
525+ 
526+ function  flatten ( arr : any [ ] )  { 
527+     return  arr . reduce ( ( acc ,  val )  =>  Array . isArray ( val )  ? acc . concat ( flatten ( val ) )  : arr . concat ( val ) ,  [ ] ) ; 
528+ } 
0 commit comments