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
478
478
// if a row has been added and before commiting the transaction deleted
479
479
const leafRowsDirectParents = new Set < any > ( ) ;
480
480
this . records . forEach ( record => {
481
- if ( record && ! record . children && record . parent ) {
481
+ if ( record && ( ! record . children || record . children . length === 0 ) && record . parent ) {
482
482
leafRowsDirectParents . add ( record . parent ) ;
483
483
}
484
484
} ) ;
@@ -495,7 +495,7 @@ export class IgxTreeGridComponent extends IgxGridBaseDirective implements GridTy
495
495
if ( this . rowSelection === GridSelectionMode . multipleCascade ) {
496
496
const leafRowsDirectParents = new Set < any > ( ) ;
497
497
this . records . forEach ( record => {
498
- if ( record && ! record . children && record . parent ) {
498
+ if ( record && ( ! record . children || record . children . length === 0 ) && record . parent ) {
499
499
leafRowsDirectParents . add ( record . parent ) ;
500
500
}
501
501
} ) ;
You can’t perform that action at this time.
0 commit comments