From 9f15ee8cb891ba79560cb58dacbddd75c1cf4299 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 15 Jun 2022 14:25:01 +0200 Subject: [PATCH] web/elements: fix child items not having a parent set causing wrong paths Signed-off-by: Jens Langhammer --- web/src/elements/TreeView.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/elements/TreeView.ts b/web/src/elements/TreeView.ts index 1604e0783..c1c7e2f89 100644 --- a/web/src/elements/TreeView.ts +++ b/web/src/elements/TreeView.ts @@ -169,7 +169,9 @@ export class TreeView extends LitElement { } return item; } 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; } }