Skip to content

Commit b910d00

Browse files
Merge pull request #5514 from IgniteUI/ddimitrov/fix-5479-8.1.x
Fix adding child row in Tree Grid Load on Demand dev demo
2 parents bd9e662 + 718ad7f commit b910d00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/tree-grid-load-on-demand/tree-grid-load-on-demand.sample.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ export class TreeGridLoadOnDemandSampleComponent implements OnInit {
8585

8686
public addChildRow() {
8787
const selectedRowId = this.grid1.selectedRows()[0];
88+
const parent = this.grid1.records.get(selectedRowId).data;
89+
90+
if (!parent[this.grid1.hasChildrenKey]) {
91+
parent[this.grid1.hasChildrenKey] = true;
92+
}
93+
8894
this.grid1.addRow(
8995
{
9096
'employeeID': this.data1.length + this.nextRow++,

0 commit comments

Comments
 (0)