From 40f73b00cefe7c1aabb3a147fed69480f8ed17e0 Mon Sep 17 00:00:00 2001 From: sintech Date: Sun, 12 Dec 2021 19:59:18 +0300 Subject: [PATCH] Propagate expanded state all the way to the root --- InvenTree/templates/js/dynamic/nav.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/InvenTree/templates/js/dynamic/nav.js b/InvenTree/templates/js/dynamic/nav.js index fc7e677900..b38dd17b32 100644 --- a/InvenTree/templates/js/dynamic/nav.js +++ b/InvenTree/templates/js/dynamic/nav.js @@ -199,7 +199,10 @@ function enableBreadcrumbTree(options) { } if (node.state.expanded) { - nodes[node.parent].state.expanded = true; + while (node.parent != null) { + nodes[node.parent].state.expanded = true; + node = nodes[node.parent] + } } } else {