Skip to content

Commit 8b1daad

Browse files
committed
fix(treeGrid): fix add child row in load on demand dev demo #5479
1 parent dc73dd4 commit 8b1daad

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)