fix: tree view show more

This commit is contained in:
Ruben Fiszel
2024-03-30 15:53:54 +01:00
parent 57932cf839
commit f89975dc8a
2 changed files with 4 additions and 2 deletions

View File

@@ -51,7 +51,9 @@
</div>
<div>
{#if depth === 0}f/{/if}{item.folderName}
<span class="whitespace-nowrap"
>{#if depth === 0}f/{/if}{item.folderName}</span
>
<div class="text-2xs font-normal text-secondary whitespace-nowrap">
({pluralize(item.items.length, ' item')})
</div>

View File

@@ -51,7 +51,7 @@
{/if}
{/each}
</div>
{#if groupedItems.length > 30 && nbDisplayed < groupedItems.length}
{#if groupedItems.length > 15 && nbDisplayed < groupedItems.length}
<span class="text-xs"
>{nbDisplayed} root nodes out of {groupedItems.length}
<button class="ml-4" on:click={() => (nbDisplayed += 30)}>load 30 more</button></span