fix: keep column width when no sort is applied

This commit is contained in:
maxid
2026-01-02 21:12:13 +01:00
parent 4ea4275440
commit 063072f25c
2 changed files with 7 additions and 1 deletions

View File

@@ -171,7 +171,7 @@
{:then}
<h3 class="mb-2 text-lg font-semibold">Found Torrents:</h3>
<div class="overflow-y-auto rounded-md border p-2">
<Table.Root class="torrentResult">
<Table.Root>
<Table.Header>
<Table.Row>
<Table.Head>Title</Table.Head>
@@ -183,6 +183,9 @@
<ArrowUp />
{:else if getSortedColumnState(id) === false}
<ArrowDown />
{:else}
<!-- Preserve layout (column width) when no sort is applied -->
<ArrowUp class="invisible"></ArrowUp>
{/if}
</div>
</Table.Head>

View File

@@ -201,6 +201,9 @@
<ArrowUp />
{:else if getSortedColumnState(id) === false}
<ArrowDown />
{:else}
<!-- Preserve layout (column width) when no sort is applied -->
<ArrowUp class="invisible"></ArrowUp>
{/if}
</div>
</Table.Head>