only scroll data table horizontally on small screens
All checks were successful
deploy / build-and-deploy (push) Successful in 26s
All checks were successful
deploy / build-and-deploy (push) Successful in 26s
Co-authored-by: Gemini 3 <google-gemini-noreply@google.com>
This commit is contained in:
@@ -27,15 +27,18 @@
|
|||||||
let { data, count, keys, onClick, onEdit, onDelete, extraActions }: Props<any> = $props();
|
let { data, count, keys, onClick, onEdit, onDelete, extraActions }: Props<any> = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="max-h-full overflow-x-auto">
|
<div class="max-h-full overflow-x-auto lg:overflow-x-visible">
|
||||||
<table class="table table-pin-rows w-full table-auto lg:w-fit lg:min-w-full mx-auto">
|
<table class="table table-pin-rows w-full table-auto mx-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<SortableTr {data}>
|
<SortableTr {data}>
|
||||||
{#if count}
|
{#if count}
|
||||||
<SortableTh style="width: 1%" class="text-left">#</SortableTh>
|
<SortableTh style="width: 1%" class="text-left">#</SortableTh>
|
||||||
{/if}
|
{/if}
|
||||||
{#each keys as key (key.key)}
|
{#each keys as key (key.key)}
|
||||||
<SortableTh class="text-left whitespace-nowrap" key={key.sortable ? key.key : undefined}>
|
<SortableTh
|
||||||
|
class="text-left whitespace-nowrap lg:whitespace-normal"
|
||||||
|
key={key.sortable ? key.key : undefined}
|
||||||
|
>
|
||||||
{key.label}
|
{key.label}
|
||||||
</SortableTh>
|
</SortableTh>
|
||||||
{/each}
|
{/each}
|
||||||
@@ -51,7 +54,7 @@
|
|||||||
<td class="text-left">{i + 1}</td>
|
<td class="text-left">{i + 1}</td>
|
||||||
{/if}
|
{/if}
|
||||||
{#each keys as key (key.key)}
|
{#each keys as key (key.key)}
|
||||||
<td class="text-left whitespace-nowrap">
|
<td class="text-left whitespace-nowrap lg:whitespace-normal">
|
||||||
{#if key.transform}
|
{#if key.transform}
|
||||||
{@render key.transform(getObjectEntryByKey(key.key, d))}
|
{@render key.transform(getObjectEntryByKey(key.key, d))}
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
Reference in New Issue
Block a user