File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
projects/igniteui-angular/src/lib/grids/pivot-grid Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -251,9 +251,10 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
251251 hierarchy . get ( val . value ) . children . set ( child . value , child ) ;
252252 }
253253 } else {
254+ const children = val . children ;
254255 hierarchy . set ( val . value , val ) ;
255256 hierarchy . get ( val . value ) . children = new Map < string , any > ( ) ;
256- for ( const child of val . children ) {
257+ for ( const child of children ) {
257258 hierarchy . get ( val . value ) . children . set ( child . value , child ) ;
258259 }
259260 }
@@ -267,7 +268,15 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
267268 let i = 0 ;
268269 for ( const col of dims ) {
269270 const value = typeof col . member === 'string' ? recData [ col . member ] : col . member . call ( this , recData ) ;
270- vals . push ( { value } ) ;
271+ if ( vals . length > 0 ) {
272+ const newChildVal = vals [ 0 ] . value + '-' + value ;
273+ if ( ! vals [ 0 ] . children ) {
274+ vals [ 0 ] . children = [ ] ;
275+ }
276+ vals [ 0 ] . children . push ( { value } ) ;
277+ } else {
278+ vals . push ( { value } ) ;
279+ }
271280 if ( col . childLevels != null && col . childLevels . length > 0 ) {
272281 const childValues = this . extractValuesFromDimension ( col . childLevels , recData ) ;
273282 vals [ i ] . children = childValues ;
You can’t perform that action at this time.
0 commit comments