From a8235e9ee585db2d7745ae9b9b3af1d65a4d1703 Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Thu, 28 Nov 2024 12:33:20 +0100 Subject: [PATCH] fix indexTree --- packages/web/src/components/treeView.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/web/src/components/treeView.tsx b/packages/web/src/components/treeView.tsx index e6cf557e99..b57a56404a 100644 --- a/packages/web/src/components/treeView.tsx +++ b/packages/web/src/components/treeView.tsx @@ -331,6 +331,8 @@ function indexTree( if (isVisible && !isVisible(parent)) return; for (const item of parent.children as T[]) { + if (isVisible && !isVisible(item)) + continue; const expandState = temporaryExpanded.has(item.id) || expandedItems.get(item.id); const autoExpandMatches = autoExpandDepth > depth && result.size < 25 && expandState !== false; const expanded = item.children.length ? expandState ?? autoExpandMatches : undefined;