fix indexTree

This commit is contained in:
Simon Knott 2024-11-28 12:33:20 +01:00
parent bed1a9e2fa
commit a8235e9ee5
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -331,6 +331,8 @@ function indexTree<T extends TreeItem>(
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;