@@ -56,23 +56,23 @@ export class PivotRowDimensionsStrategy implements IPivotDimensionStrategy {
56
56
. processHierarchy ( hierarchyFields , newData [ i ] ?? [ ] , pivotKeys , 0 ) ;
57
57
PivotUtil . processSiblingProperties ( newData [ i ] , siblingData , pivotKeys ) ;
58
58
59
- PivotUtil . processSubGroups ( row , prevRowDims . slice ( 0 ) , siblingData , pivotKeys ) ;
60
- if ( PivotUtil . getDimensionDepth ( prevDim ) > PivotUtil . getDimensionDepth ( row ) && siblingData . length > 1 ) {
61
- newData [ i ] [ row . memberName + '_' + pivotKeys . records ] = siblingData ;
62
- i ++ ;
63
- } else {
64
- newData . splice ( i , 1 , ...siblingData ) ;
65
- i += siblingData . length - 1 ;
66
- }
59
+ PivotUtil . processSubGroups ( row , prevRowDims . slice ( 0 ) , siblingData , pivotKeys ) ;
60
+ if ( PivotUtil . getDimensionDepth ( prevDim ) > PivotUtil . getDimensionDepth ( row ) && siblingData . length > 1 ) {
61
+ newData [ i ] [ row . memberName + '_' + pivotKeys . records ] = siblingData ;
62
+ i ++ ;
63
+ } else {
64
+ newData . splice ( i , 1 , ...siblingData ) ;
65
+ i += siblingData . length - 1 ;
67
66
}
68
- data = newData ;
69
- prevDim = row ;
70
- prevRowDims . push ( row ) ;
71
67
}
68
+ data = newData ;
69
+ prevDim = row ;
70
+ prevRowDims . push ( row ) ;
72
71
}
73
- return data ;
74
72
}
73
+ return data ;
75
74
}
75
+ }
76
76
77
77
export class PivotColumnDimensionsStrategy implements IPivotDimensionStrategy {
78
78
private static _instance : PivotRowDimensionsStrategy = null ;
@@ -175,7 +175,7 @@ export class DimensionValuesFilteringStrategy extends FilteringStrategy {
175
175
}
176
176
177
177
protected getFieldValue ( rec : any , fieldName : string , isDate : boolean = false , isTime : boolean = false ,
178
- grid ?: PivotGridType ) : any {
178
+ grid ?: PivotGridType ) : any {
179
179
const config = grid . pivotConfiguration ;
180
180
const allDimensions = config . rows . concat ( config . columns ) . concat ( config . filters ) . filter ( x => x !== null ) ;
181
181
const enabledDimensions = allDimensions . filter ( x => x && x . enabled ) ;
@@ -191,13 +191,13 @@ export class DefaultPivotSortingStrategy extends DefaultSortingStrategy {
191
191
return this . _instance || ( this . _instance = new this ( ) ) ;
192
192
}
193
193
public sort ( data : any [ ] ,
194
- fieldName : string ,
195
- dir : SortingDirection ,
196
- ignoreCase : boolean ,
197
- valueResolver : ( obj : any , key : string , isDate ?: boolean ) => any ,
198
- isDate ?: boolean ,
199
- isTime ?: boolean ,
200
- grid ?: PivotGridType ) {
194
+ fieldName : string ,
195
+ dir : SortingDirection ,
196
+ ignoreCase : boolean ,
197
+ valueResolver : ( obj : any , key : string , isDate ?: boolean ) => any ,
198
+ isDate ?: boolean ,
199
+ isTime ?: boolean ,
200
+ grid ?: PivotGridType ) {
201
201
const key = fieldName ;
202
202
const config = grid . pivotConfiguration ;
203
203
const allDimensions = config . rows . concat ( config . columns ) . concat ( config . filters ) . filter ( x => x !== null ) ;
0 commit comments