mirror of
https://github.com/LukeHagar/idn-admin-console.git
synced 2025-12-09 20:47:46 +00:00
Refactor pagination logic in identities page
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
<div class="card flex justify-center flex-col align-middle">
|
<div class="card flex justify-center flex-col align-middle">
|
||||||
{#await data.totalCount then totalCount}
|
{#await data.totalCount then totalCount}
|
||||||
|
{#if totalCount > 250 || Number(data.params.limit) < totalCount}
|
||||||
<Paginator
|
<Paginator
|
||||||
{onAmountChange}
|
{onAmountChange}
|
||||||
{onGo}
|
{onGo}
|
||||||
@@ -41,9 +42,12 @@
|
|||||||
{sorters}
|
{sorters}
|
||||||
{totalCount}
|
{totalCount}
|
||||||
/>
|
/>
|
||||||
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
{#await data.identities}
|
{#await data.identities}
|
||||||
<Progress />
|
<div class="grid h-full place-content-center p-8">
|
||||||
|
<Progress width="w-[100px]" />
|
||||||
|
</div>
|
||||||
{:then identities}
|
{:then identities}
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@@ -99,6 +103,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/await}
|
{/await}
|
||||||
{#await data.totalCount then totalCount}
|
{#await data.totalCount then totalCount}
|
||||||
|
{#if totalCount > 250 || Number(data.params.limit) < totalCount}
|
||||||
<Paginator
|
<Paginator
|
||||||
{onAmountChange}
|
{onAmountChange}
|
||||||
{onGo}
|
{onGo}
|
||||||
@@ -113,5 +118,6 @@
|
|||||||
{sorters}
|
{sorters}
|
||||||
{totalCount}
|
{totalCount}
|
||||||
/>
|
/>
|
||||||
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user