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 {
221221 const children = hierarchy [ pivotKeys . children ] ;
222222 if ( children && children . size > 0 ) {
223223 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 ) ;
226226 } else if ( hierarchy [ pivotKeys . records ] ) {
227227 hierarchy [ pivotKeys . aggregations ] = this . aggregate ( hierarchy [ pivotKeys . records ] , values ) ;
228228 }
@@ -403,10 +403,9 @@ export class PivotUtil {
403403 return flatData ;
404404 }
405405
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 ] ) ) ;
410409 return result ;
411410 }
412411
You can’t perform that action at this time.
0 commit comments