fixed pagination in payouts
This commit is contained in:
parent
e412092a4d
commit
7eea76a798
@ -3,7 +3,7 @@
|
||||
export let pageChangedCallback;
|
||||
export let disableButtons;
|
||||
export let css;
|
||||
let currentPage = 1;
|
||||
export let currentPage = 1;
|
||||
</script>
|
||||
|
||||
<div class="join">
|
||||
@ -14,9 +14,9 @@
|
||||
pageChangedCallback(currentPage);
|
||||
}}
|
||||
disabled={disableButtons}
|
||||
class={"join-item btn "+css}>«</button
|
||||
class={"join-item btn " + css}>«</button
|
||||
>
|
||||
<button class={"join-item btn "+css}>Страница №{currentPage}</button>
|
||||
<button class={"join-item btn " + css}>Страница №{currentPage}</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
if (currentPage === totalPages) return;
|
||||
@ -24,6 +24,6 @@
|
||||
pageChangedCallback(currentPage);
|
||||
}}
|
||||
disabled={disableButtons}
|
||||
class={"join-item btn "+css}>»</button
|
||||
class={"join-item btn " + css}>»</button
|
||||
>
|
||||
</div>
|
||||
|
||||
@ -77,7 +77,6 @@
|
||||
numOfPagesPayouts = result.data.pages === 0 ? 1 : result.data?.pages;
|
||||
disablePagesPayouts = false;
|
||||
} else {
|
||||
currentPagePayouts = 1;
|
||||
let s = searchFilter.trim();
|
||||
let useUUID = s.includes("-") && s.length === 36;
|
||||
if (useUUID) {
|
||||
@ -532,6 +531,8 @@
|
||||
<div class="flex gap-[5px]">
|
||||
<button
|
||||
on:click={() => {
|
||||
numOfPagesPayouts = 1;
|
||||
currentPagePayouts = 1;
|
||||
getPayouts();
|
||||
}}
|
||||
class="btn btn-neutral rounded-[10px]"
|
||||
@ -571,6 +572,7 @@
|
||||
</div>
|
||||
<div class="w-full flex flex-col justify-center items-center mt-2">
|
||||
<Pagination
|
||||
currentPage={currentPagePayouts}
|
||||
totalPages={numOfPagesPayouts}
|
||||
pageChangedCallback={(n) => {
|
||||
currentPagePayouts = n;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user