Skip to content

Commit 8f7ce1c

Browse files
committed
Fix server side Pagination #BEXIS2/Core#1893
1 parent 22e3e53 commit 8f7ce1c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lib/components/Table/TablePaginationServer.svelte

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
<div class="grid grid-cols-3 w-full items-stretch gap-10">
4949
<div class="flex justify-start">
50+
<!-- replace default select from Paginator below to be able to style properly -->
5051
<button
5152
aria-label="Open menu to select number of items to display per page"
5253
class="btn variant-filled-primary w-20 !px-3 !py-1.5 justify-between"
@@ -58,7 +59,10 @@
5859
<div class="card w-20 shadow-xl py-2" data-popup={`#${id}-pageSizeDropdown`}>
5960
<ListBox rounded="rounded-none">
6061
{#each pageSizes as size}
61-
<ListBoxItem bind:group={pageSizeDropdownValue} name="medium" value={size}
62+
<ListBoxItem
63+
bind:group={pageSizeDropdownValue}
64+
name="medium" value={size}
65+
on:click={() => { $pageSize = size; updateTable(); }}
6266
>{size}</ListBoxItem
6367
>
6468
{/each}
@@ -68,8 +72,7 @@
6872
</div>
6973
<div class="flex justify-center">
7074
<Paginator
71-
on:page={(page) => (updateTable(), $pageIndex = page.detail)}
72-
on:amount={(amount) => (updateTable(), ($pageSize = amount.detail))}
75+
on:page={(page) => {$pageIndex = page.detail; updateTable(); }}
7376
settings={paginationSettings}
7477
select="hidden"
7578
active="!variant-filled-secondary !text-on-secondary-token"

0 commit comments

Comments
 (0)