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 @@ -221,8 +221,8 @@ export class PivotUtil {
221
221
const children = hierarchy [ pivotKeys . children ] ;
222
222
if ( children && children . size > 0 ) {
223
223
this . applyAggregations ( children , values , pivotKeys ) ;
224
- const childrenAggregations = this . collectAggregations ( children , pivotKeys ) ;
225
- hierarchy [ pivotKeys . aggregations ] = this . aggregate ( childrenAggregations , values ) ;
224
+ const childRecords = this . collectRecords ( children , pivotKeys ) ;
225
+ hierarchy [ pivotKeys . aggregations ] = this . aggregate ( childRecords , values ) ;
226
226
} else if ( hierarchy [ pivotKeys . records ] ) {
227
227
hierarchy [ pivotKeys . aggregations ] = this . aggregate ( hierarchy [ pivotKeys . records ] , values ) ;
228
228
}
@@ -403,10 +403,9 @@ export class PivotUtil {
403
403
return flatData ;
404
404
}
405
405
406
- private static collectAggregations ( children , pivotKeys ) {
407
- const result = [ ] ;
408
- children . forEach ( value => result . push ( value [ pivotKeys . aggregations ] ) ) ;
409
-
406
+ private static collectRecords ( children , pivotKeys : IPivotKeys ) {
407
+ let result = [ ] ;
408
+ children . forEach ( value => result = result . concat ( value [ pivotKeys . records ] ) ) ;
410
409
return result ;
411
410
}
412
411
You can’t perform that action at this time.
0 commit comments