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}
<Pagination
bind:page
{page}
{itemsPerPage}
itemText="Jobs"
totalItems={matchedListJobs}

View File

@ -14,7 +14,7 @@
<script>
/* Svelte 5 Props */
let {
page = $bindable(1),
page = 1,
itemsPerPage = 10,
totalItems = 0,
itemText = "items",
@ -63,7 +63,7 @@
<span class="focus"></span>
</div>
<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>
</div>
<div class="cc-pagination-right">

View File

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