@@ -23,7 +23,8 @@ import {
23
23
ViewContainerRef ,
24
24
Injector ,
25
25
NgModuleRef ,
26
- ApplicationRef } from '@angular/core' ;
26
+ ApplicationRef
27
+ } from '@angular/core' ;
27
28
import { IgxGridBaseDirective } from '../grid-base.directive' ;
28
29
import { IgxFilteringService } from '../filtering/grid-filtering.service' ;
29
30
import { IgxGridSelectionService } from '../selection/selection.service' ;
@@ -648,7 +649,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
648
649
dropdown . overlayComponentId = id ;
649
650
return { id, ref : undefined } ;
650
651
}
651
- return { id : dropdown . overlayComponentId , ref : undefined } ;
652
+ return { id : dropdown . overlayComponentId , ref : undefined } ;
652
653
}
653
654
}
654
655
@@ -1144,11 +1145,12 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
1144
1145
if ( dimType === PivotDimensionType . Column ) {
1145
1146
this . setupColumns ( ) ;
1146
1147
}
1147
- if ( ! dimension . enabled ) {
1148
+ if ( ! dimension . enabled && dimension . filter ) {
1148
1149
this . filteringService . clearFilter ( dimension . memberName ) ;
1149
1150
}
1150
1151
this . pipeTrigger ++ ;
1151
1152
this . dimensionsChange . emit ( { dimensions : collection , dimensionCollectionType : dimType } ) ;
1153
+ this . cdr . detectChanges ( ) ;
1152
1154
}
1153
1155
1154
1156
/**
@@ -1264,9 +1266,9 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
1264
1266
protected rowDimensionContentCollection : QueryList < IgxPivotRowDimensionContentComponent > ;
1265
1267
1266
1268
protected getDimensionType ( dimension : IPivotDimension ) : PivotDimensionType {
1267
- return PivotUtil . flatten ( this . rowDimensions ) . indexOf ( dimension ) !== - 1 ? PivotDimensionType . Row :
1268
- PivotUtil . flatten ( this . columnDimensions ) . indexOf ( dimension ) !== - 1 ? PivotDimensionType . Column :
1269
- PivotUtil . flatten ( this . filterDimensions ) . indexOf ( dimension ) !== - 1 ? PivotDimensionType . Filter : null ;
1269
+ return PivotUtil . flatten ( this . pivotConfiguration . rows ) . indexOf ( dimension ) !== - 1 ? PivotDimensionType . Row :
1270
+ PivotUtil . flatten ( this . pivotConfiguration . columns ) . indexOf ( dimension ) !== - 1 ? PivotDimensionType . Column :
1271
+ PivotUtil . flatten ( this . pivotConfiguration . filters ) . indexOf ( dimension ) !== - 1 ? PivotDimensionType . Filter : null ;
1270
1272
}
1271
1273
1272
1274
protected getLargesContentWidth ( contents : ElementRef [ ] ) : string {
@@ -1509,8 +1511,8 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
1509
1511
const factoryColumnGroup = this . resolver . resolveComponentFactory ( IgxColumnGroupComponent ) ;
1510
1512
const key = value . value ;
1511
1513
const ref = isGroup ?
1512
- factoryColumnGroup . create ( this . viewRef . injector ) :
1513
- factoryColumn . create ( this . viewRef . injector ) ;
1514
+ factoryColumnGroup . create ( this . viewRef . injector ) :
1515
+ factoryColumn . create ( this . viewRef . injector ) ;
1514
1516
ref . instance . header = parent != null ? key . split ( parent . header + this . pivotKeys . columnDimensionSeparator ) [ 1 ] : key ;
1515
1517
ref . instance . field = key ;
1516
1518
ref . instance . parent = parent ;
0 commit comments