web/elements: fix child items not having a parent set causing wrong paths

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-06-15 14:25:01 +02:00
parent e892ed14da
commit 9f15ee8cb8
1 changed files with 3 additions and 1 deletions

View File

@ -169,7 +169,9 @@ export class TreeView extends LitElement {
} }
return item; return item;
} else { } else {
return this.createNode(path, tree[idx].childItems, level + 1); const child = this.createNode(path, tree[idx].childItems, level + 1);
child.parent = tree[idx];
return child;
} }
} }