File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
projects/igniteui-angular/src/lib/data-operations Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -114,17 +114,20 @@ export class PivotColumnDimensionsStrategy implements IPivotDimensionStrategy {
114
114
and use when creating the columns in pivot grid instead of recreating it */
115
115
const keys = Object . keys ( hierarchy ) ;
116
116
//remove all record keys from final data since we don't need them anymore.
117
+ hierarchy . processed = true ;
117
118
keys . forEach ( k => {
118
119
if ( k . indexOf ( pivotKeys . records ) !== - 1 ) {
119
- if ( hierarchy [ k ] && k !== pivotKeys . records ) {
120
- this . processHierarchy ( hierarchy [ k ] , columns , values , pivotKeys ) ;
120
+ if ( hierarchy [ k ] && hierarchy [ k ] . length > 0 && k !== pivotKeys . records ) {
121
+ const unprocessed = hierarchy [ k ] . filter ( r => ! r . processed ) ;
122
+ this . processHierarchy ( unprocessed , columns , values , pivotKeys ) ;
121
123
}
122
124
//delete hierarchy[k];
123
125
}
124
126
if ( k === pivotKeys . level ) {
125
127
delete hierarchy [ k ] ;
126
128
}
127
129
} ) ;
130
+ delete hierarchy . processed ;
128
131
if ( this . isLeaf ( hierarchy , pivotKeys ) ) {
129
132
delete hierarchy [ pivotKeys . records ] ; /* remove the helper records of the actual records so that
130
133
expand indicators can be rendered properly */
You can’t perform that action at this time.
0 commit comments