File tree 4 files changed +16
-8
lines changed
projects/igniteui-angular/src/lib
4 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { cloneArray } from '../core/utils';
5
5
import { IgxRippleModule } from '../directives/ripple/ripple.directive' ;
6
6
import { IgxButtonModule } from '../directives/button/button.directive' ;
7
7
import { IgxAvatarModule } from '../avatar/avatar.component' ;
8
- import { IgxIconModule } from '../icon' ;
8
+ import { IgxIconModule } from '../icon/index ' ;
9
9
import { IgxConnectorDirective } from './connector.directive' ;
10
10
import { IgxChipComponent } from './chip.component' ;
11
11
import { IgxChipsAreaComponent } from './chips-area.component' ;
Original file line number Diff line number Diff line change @@ -235,9 +235,11 @@ export class IgxColumnComponent implements AfterContentInit {
235
235
get visibleIndex ( ) : number {
236
236
const grid = this . gridAPI . get ( this . gridID ) ;
237
237
let vIndex = - 1 ;
238
+
238
239
if ( this . columnGroup ) {
239
240
return vIndex ;
240
241
}
242
+
241
243
if ( ! this . pinned ) {
242
244
const indexInCollection = grid . unpinnedColumns . indexOf ( this ) ;
243
245
vIndex = indexInCollection === - 1 ? - 1 : grid . pinnedColumns . length + indexInCollection ;
@@ -502,7 +504,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
502
504
503
505
@Input ( )
504
506
get hidden ( ) {
505
- return this . _hidden ;
507
+ return this . allChildren . every ( c => c . hidden ) ;
506
508
}
507
509
508
510
set hidden ( value : boolean ) {
@@ -537,8 +539,8 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
537
539
}
538
540
539
541
540
- function flatten ( arr : any [ ] ) {
541
542
543
+ function flatten ( arr : any [ ] ) {
542
544
let result = [ ] ;
543
545
544
546
arr . forEach ( el => {
Original file line number Diff line number Diff line change 2
2
< app-page-header title ="Dropdown menu " description ="description for dropdown menu "> </ app-page-header >
3
3
< section class ="sample-content ">
4
4
< 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() ">
6
6
< igx-drop-down-item *ngFor ="let item of items " disabled ={{item.disabled}} isHeader ={{item.header}} >
7
7
< div class ="igx-drop-down__item-template ">
8
8
{{ item.field }}
9
9
</ div >
10
10
</ igx-drop-down-item >
11
11
</ igx-drop-down >
12
12
</ 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' ;
2
2
import { IgxGridComponent } from 'igniteui-angular' ;
3
3
4
4
@Component ( {
5
5
selector : 'app-grid-column-groups-sample' ,
6
6
templateUrl : 'grid-column-groups.sample.html'
7
7
} )
8
- export class GridColumnGroupsSampleComponent {
8
+ export class GridColumnGroupsSampleComponent implements AfterViewInit {
9
9
10
10
@ViewChild ( 'grid' , { read : IgxGridComponent } )
11
11
grid : IgxGridComponent ;
@@ -43,12 +43,18 @@ export class GridColumnGroupsSampleComponent {
43
43
// tslint:enable:max-line-length
44
44
45
45
pinGroup ( ) {
46
- const t = this . grid . getColumnByName ( 'ID ' ) ;
46
+ const t = this . grid . getColumnByName ( 'ContactTitle ' ) ;
47
47
t . pinned = ! t . pinned ;
48
48
}
49
49
50
50
hideGroup ( ) {
51
51
const col = this . grid . columnList . filter ( c => c . header === 'Person Details' ) [ 0 ] ;
52
52
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 });
53
59
}
54
60
}
You can’t perform that action at this time.
0 commit comments