@coyalabs/bts-style 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,16 +22,19 @@
|
|
|
22
22
|
export let topFoldersExpanded = false;
|
|
23
23
|
|
|
24
24
|
let expanded = new Set();
|
|
25
|
+
let mounted = false;
|
|
26
|
+
|
|
27
|
+
// Initialize expanded state before mount (no animation)
|
|
28
|
+
if (topFoldersExpanded && level === 0) {
|
|
29
|
+
items.forEach((item, i) => {
|
|
30
|
+
if (item.type === 'folder') {
|
|
31
|
+
expanded.add(`${level}-${i}`);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
25
35
|
|
|
26
36
|
onMount(() => {
|
|
27
|
-
|
|
28
|
-
items.forEach((item, i) => {
|
|
29
|
-
if (item.type === 'folder') {
|
|
30
|
-
expanded.add(`${level}-${i}`);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
expanded = expanded;
|
|
34
|
-
}
|
|
37
|
+
mounted = true;
|
|
35
38
|
});
|
|
36
39
|
|
|
37
40
|
/**
|
|
@@ -139,7 +142,7 @@
|
|
|
139
142
|
</Button>
|
|
140
143
|
</div>
|
|
141
144
|
{#if open && item.children}
|
|
142
|
-
<div transition:slide={{ duration: 150 }}>
|
|
145
|
+
<div transition:slide={{ duration: mounted ? 150 : 0 }}>
|
|
143
146
|
<svelte:self items={item.children} {showCount} {itemIcon} level={level + 1} on:itemClick />
|
|
144
147
|
</div>
|
|
145
148
|
{/if}
|