File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
projects/igniteui-angular/src/lib/grids/columns Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
3939 public set collapsible ( value : boolean ) {
4040 this . _collapsible = value ;
4141 this . collapsibleChange . emit ( this . _collapsible ) ;
42- if ( this . children ) {
42+ if ( this . children && ! this . hidden ) {
4343 if ( value ) {
4444 this . setExpandCollapseState ( ) ;
4545 } else {
Original file line number Diff line number Diff line change @@ -1021,10 +1021,18 @@ export class IgxColumnComponent implements AfterContentInit {
10211021 @Input ( )
10221022 set visibleOnCollapse ( value : boolean ) {
10231023 this . _visibleOnCollapse = value ;
1024+ if ( this . parent ) {
1025+ const cols = this . parent . children . map ( child => child . visibleOnCollapse ) ;
1026+ if ( ! ( cols . some ( c => c === true ) && cols . some ( c => c === false ) ) ) {
1027+ this . parent . collapsible = false ;
1028+ } else {
1029+ this . parent . collapsible = true ;
1030+ }
1031+ }
10241032 }
10251033
10261034 get visibleOnCollapse ( ) : boolean {
1027- if ( ! this . parent ) { return false ; }
1035+ if ( ! this . parent ) { return ; }
10281036 return this . _visibleOnCollapse ;
10291037 }
10301038
You can’t perform that action at this time.
0 commit comments