File tree Expand file tree Collapse file tree
projects/igniteui-angular/src/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { cloneArray } from '../core/utils';
55import { IgxRippleModule } from '../directives/ripple/ripple.directive' ;
66import { IgxButtonModule } from '../directives/button/button.directive' ;
77import { IgxAvatarModule } from '../avatar/avatar.component' ;
8- import { IgxIconModule } from '../icon' ;
8+ import { IgxIconModule } from '../icon/index ' ;
99import { IgxConnectorDirective } from './connector.directive' ;
1010import { IgxChipComponent } from './chip.component' ;
1111import { IgxChipsAreaComponent } from './chips-area.component' ;
Original file line number Diff line number Diff line change @@ -235,9 +235,11 @@ export class IgxColumnComponent implements AfterContentInit {
235235 get visibleIndex ( ) : number {
236236 const grid = this . gridAPI . get ( this . gridID ) ;
237237 let vIndex = - 1 ;
238+
238239 if ( this . columnGroup ) {
239240 return vIndex ;
240241 }
242+
241243 if ( ! this . pinned ) {
242244 const indexInCollection = grid . unpinnedColumns . indexOf ( this ) ;
243245 vIndex = indexInCollection === - 1 ? - 1 : grid . pinnedColumns . length + indexInCollection ;
@@ -502,7 +504,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
502504
503505 @Input ( )
504506 get hidden ( ) {
505- return this . _hidden ;
507+ return this . allChildren . every ( c => c . hidden ) ;
506508 }
507509
508510 set hidden ( value : boolean ) {
@@ -537,8 +539,8 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
537539}
538540
539541
540- function flatten ( arr : any [ ] ) {
541542
543+ function flatten ( arr : any [ ] ) {
542544 let result = [ ] ;
543545
544546 arr . forEach ( el => {
Original file line number Diff line number Diff line change 22 < app-page-header title ="Dropdown menu " description ="description for dropdown menu "> </ app-page-header >
33 < section class ="sample-content ">
44 < button #button igxButton ="raised " igxRipple (click) ="toggleDropDown() "> Toggle</ button >
5- < igx-drop-down (onSelection) ="onSelection($event ) " (onOpening) ="onOpening($event ) ">
5+ < igx-drop-down (onSelection) ="onSelection() " (onOpening) ="onOpening() ">
66 < igx-drop-down-item *ngFor ="let item of items " disabled ={{item.disabled}} isHeader ={{item.header}} >
77 < div class ="igx-drop-down__item-template ">
88 {{ item.field }}
99 </ div >
1010 </ igx-drop-down-item >
1111 </ igx-drop-down >
1212 </ section >
13- </ div >
13+ </ div >
Original file line number Diff line number Diff line change 1- import { Component , ViewChild } from '@angular/core' ;
1+ import { Component , ViewChild , AfterViewInit } from '@angular/core' ;
22import { IgxGridComponent } from 'igniteui-angular' ;
33
44@Component ( {
55 selector : 'app-grid-column-groups-sample' ,
66 templateUrl : 'grid-column-groups.sample.html'
77} )
8- export class GridColumnGroupsSampleComponent {
8+ export class GridColumnGroupsSampleComponent implements AfterViewInit {
99
1010 @ViewChild ( 'grid' , { read : IgxGridComponent } )
1111 grid : IgxGridComponent ;
@@ -43,12 +43,18 @@ export class GridColumnGroupsSampleComponent {
4343 // tslint:enable:max-line-length
4444
4545 pinGroup ( ) {
46- const t = this . grid . getColumnByName ( 'ID ' ) ;
46+ const t = this . grid . getColumnByName ( 'ContactTitle ' ) ;
4747 t . pinned = ! t . pinned ;
4848 }
4949
5050 hideGroup ( ) {
5151 const col = this . grid . columnList . filter ( c => c . header === 'Person Details' ) [ 0 ] ;
5252 col . hidden = ! col . hidden ;
53+ this . grid . getColumnByName ( 'CompanyName' ) . hidden = true ;
54+ console . log ( this . grid . getColumnByName ( 'CompanyName' ) . parent ) ;
55+ }
56+
57+ ngAfterViewInit ( ) {
58+ // this.grid.groupBy({ fieldName: 'Country', dir: 1, ignoreCase: false });
5359 }
5460}
You can’t perform that action at this time.
0 commit comments