mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-01 11:13:50 +02:00
fix: remove unnecessary bind, correct page item minimum
This commit is contained in:
parent
d40657dc64
commit
d6d92071bf
@ -317,7 +317,7 @@
|
|||||||
|
|
||||||
{#if usePaging}
|
{#if usePaging}
|
||||||
<Pagination
|
<Pagination
|
||||||
bind:page
|
{page}
|
||||||
{itemsPerPage}
|
{itemsPerPage}
|
||||||
itemText="Jobs"
|
itemText="Jobs"
|
||||||
totalItems={matchedListJobs}
|
totalItems={matchedListJobs}
|
||||||
|
@ -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">
|
||||||
|
@ -262,7 +262,7 @@
|
|||||||
|
|
||||||
{#if usePaging}
|
{#if usePaging}
|
||||||
<Pagination
|
<Pagination
|
||||||
bind:page
|
{page}
|
||||||
{itemsPerPage}
|
{itemsPerPage}
|
||||||
itemText="Nodes"
|
itemText="Nodes"
|
||||||
totalItems={matchedNodes}
|
totalItems={matchedNodes}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user