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 {
114114 and use when creating the columns in pivot grid instead of recreating it */
115115 const keys = Object . keys ( hierarchy ) ;
116116 //remove all record keys from final data since we don't need them anymore.
117+ hierarchy . processed = true ;
117118 keys . forEach ( k => {
118119 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 ) ;
121123 }
122124 //delete hierarchy[k];
123125 }
124126 if ( k === pivotKeys . level ) {
125127 delete hierarchy [ k ] ;
126128 }
127129 } ) ;
130+ delete hierarchy . processed ;
128131 if ( this . isLeaf ( hierarchy , pivotKeys ) ) {
129132 delete hierarchy [ pivotKeys . records ] ; /* remove the helper records of the actual records so that
130133 expand indicators can be rendered properly */
You can’t perform that action at this time.
0 commit comments