File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
projects/igniteui-angular/src/lib/grids/tree-grid Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -478,7 +478,7 @@ export class IgxTreeGridComponent extends IgxGridBaseDirective implements GridTy
478478 // if a row has been added and before commiting the transaction deleted
479479 const leafRowsDirectParents = new Set < any > ( ) ;
480480 this . records . forEach ( record => {
481- if ( record && ! record . children && record . parent ) {
481+ if ( record && ( ! record . children || record . children . length === 0 ) && record . parent ) {
482482 leafRowsDirectParents . add ( record . parent ) ;
483483 }
484484 } ) ;
@@ -495,7 +495,7 @@ export class IgxTreeGridComponent extends IgxGridBaseDirective implements GridTy
495495 if ( this . rowSelection === GridSelectionMode . multipleCascade ) {
496496 const leafRowsDirectParents = new Set < any > ( ) ;
497497 this . records . forEach ( record => {
498- if ( record && ! record . children && record . parent ) {
498+ if ( record && ( ! record . children || record . children . length === 0 ) && record . parent ) {
499499 leafRowsDirectParents . add ( record . parent ) ;
500500 }
501501 } ) ;
You can’t perform that action at this time.
0 commit comments