fix: remove unnecessary bind, correct page item minimum

This commit is contained in:
Christoph Kluge 2025-06-16 13:04:33 +02:00
parent d40657dc64
commit d6d92071bf
3 changed files with 4 additions and 4 deletions

View File

@ -317,7 +317,7 @@
{#if usePaging} {#if usePaging}
<Pagination <Pagination
bind:page {page}
{itemsPerPage} {itemsPerPage}
itemText="Jobs" itemText="Jobs"
totalItems={matchedListJobs} totalItems={matchedListJobs}

View File

@ -14,7 +14,7 @@
<script> <script>
/* Svelte 5 Props */ /* Svelte 5 Props */
let { let {
page = $bindable(1), page = 1,
itemsPerPage = 10, itemsPerPage = 10,
totalItems = 0, totalItems = 0,
itemText = "items", itemText = "items",
@ -63,7 +63,7 @@
<span class="focus"></span> <span class="focus"></span>
</div> </div>
<span class="cc-pagination-text"> <span class="cc-pagination-text">
{ (page - 1) * itemsPerPage } - { Math.min((page - 1) * itemsPerPage + itemsPerPage, totalItems) } of { totalItems } { itemText } { ((page - 1) * itemsPerPage) + 1 } - { Math.min((page - 1) * itemsPerPage + itemsPerPage, totalItems) } of { totalItems } { itemText }
</span> </span>
</div> </div>
<div class="cc-pagination-right"> <div class="cc-pagination-right">

View File

@ -262,7 +262,7 @@
{#if usePaging} {#if usePaging}
<Pagination <Pagination
bind:page {page}
{itemsPerPage} {itemsPerPage}
itemText="Nodes" itemText="Nodes"
totalItems={matchedNodes} totalItems={matchedNodes}