File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
projects/igniteui-angular/src/lib/grids/pivot-grid Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -220,8 +220,8 @@ export class PivotUtil {
220
220
const children = hierarchy [ pivotKeys . children ] ;
221
221
if ( children && children . size > 0 ) {
222
222
this . applyAggregations ( children , values , pivotKeys ) ;
223
- const childrenAggregations = this . collectAggregations ( children , pivotKeys ) ;
224
- hierarchy [ pivotKeys . aggregations ] = this . aggregate ( childrenAggregations , values ) ;
223
+ const childRecords = this . collectRecords ( children , pivotKeys ) ;
224
+ hierarchy [ pivotKeys . aggregations ] = this . aggregate ( childRecords , values ) ;
225
225
} else if ( hierarchy [ pivotKeys . records ] ) {
226
226
hierarchy [ pivotKeys . aggregations ] = this . aggregate ( hierarchy [ pivotKeys . records ] , values ) ;
227
227
}
@@ -400,10 +400,9 @@ export class PivotUtil {
400
400
return flatData ;
401
401
}
402
402
403
- private static collectAggregations ( children , pivotKeys ) {
404
- const result = [ ] ;
405
- children . forEach ( value => result . push ( value [ pivotKeys . aggregations ] ) ) ;
406
-
403
+ private static collectRecords ( children , pivotKeys : IPivotKeys ) {
404
+ let result = [ ] ;
405
+ children . forEach ( value => result = result . concat ( value [ pivotKeys . records ] ) ) ;
407
406
return result ;
408
407
}
409
408
You can’t perform that action at this time.
0 commit comments