fix: show admin row action menus uniformly

This commit is contained in:
2026-06-05 23:38:06 +01:00
parent d696557641
commit 696641bfc0
@@ -40,7 +40,6 @@
</Table.Cell>
<Table.Cell>{formatDate(user.createdAt)}</Table.Cell>
<Table.Cell>
{#if user.id !== data.currentUserId}
<DropdownMenu.Root>
<DropdownMenu.Trigger>
{#snippet child({ props })}
@@ -55,13 +54,19 @@
{/snippet}
</DropdownMenu.Trigger>
<DropdownMenu.Content align="end" class="w-36">
<DropdownMenu.Item onclick={() => openEdit(user)}>Edit</DropdownMenu.Item>
<DropdownMenu.Item variant="destructive" onclick={() => openDelete(user)}>
<DropdownMenu.Item
disabled={user.id === data.currentUserId}
onclick={() => openEdit(user)}>Edit</DropdownMenu.Item
>
<DropdownMenu.Item
variant="destructive"
disabled={user.id === data.currentUserId}
onclick={() => openDelete(user)}
>
Delete
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Root>
{/if}
</Table.Cell>
</Table.Row>
{/each}