By default everything closed

This commit is contained in:
2026-07-18 19:24:10 +02:00
parent 6a70c0cee4
commit 427f622e9c

View File

@@ -84,9 +84,9 @@ function visibleChildren(node) {
<button <button
class="folder-toggle" class="folder-toggle"
@click="toggle(node.path ?? node.title)" @click="toggle(node.path ?? node.title)"
:aria-expanded="!collapsed[node.path ?? node.title]" :aria-expanded="collapsed[node.path ?? node.title]"
> >
<span class="chevron" :class="{ open: !collapsed[node.path ?? node.title] }"></span> <span class="chevron" :class="{ open: collapsed[node.path ?? node.title] }"></span>
</button> </button>
<!-- Folder label: clickable link if there's a self-titled child, plain text otherwise --> <!-- Folder label: clickable link if there's a self-titled child, plain text otherwise -->
@@ -102,7 +102,7 @@ function visibleChildren(node) {
</div> </div>
<TreeNode <TreeNode
v-if="!collapsed[node.path ?? node.title]" v-if="collapsed[node.path ?? node.title]"
:nodes="visibleChildren(node)" :nodes="visibleChildren(node)"
:depth="depth + 1" :depth="depth + 1"
/> />