File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
projects/igniteui-angular/src/lib/grids/pivot-grid Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -23,18 +23,17 @@ export class PivotUtil {
2323 return typeof dim . member === 'string' ? recData [ dim . member ] : dim . member . call ( null , recData ) ;
2424 }
2525
26- public static extractValuesFromDimension ( dims : IPivotDimension [ ] , recData : any ) {
26+ public static extractValuesFromDimension ( dims : IPivotDimension [ ] , recData : any , path = [ ] ) {
2727 const vals = [ ] ;
2828 let lvl = 0 ;
29- const path = [ ] ;
3029 let lvlCollection = vals ;
3130 for ( const col of dims ) {
3231 const value = this . extractValueFromDimension ( col , recData ) ;
3332 path . push ( value ) ;
3433 const newValue = path . join ( '-' ) ;
3534 lvlCollection . push ( { value : newValue } ) ;
3635 if ( col . childLevels != null && col . childLevels . length > 0 ) {
37- const childValues = this . extractValuesFromDimension ( col . childLevels , recData ) ;
36+ const childValues = this . extractValuesFromDimension ( col . childLevels , recData , path ) ;
3837 vals [ lvl ] . children = childValues ;
3938 vals [ lvl ] . expandable = true ;
4039 }
You can’t perform that action at this time.
0 commit comments