mirror of
https://github.com/coaidev/coai.git
synced 2025-05-19 21:10:18 +09:00
fix: fix pagination
This commit is contained in:
parent
834ddc4163
commit
d4015c33b2
@ -127,10 +127,10 @@ const PaginationAction = ({
|
|||||||
const diff = total - real;
|
const diff = total - real;
|
||||||
|
|
||||||
const hasPrev = current > 0;
|
const hasPrev = current > 0;
|
||||||
const hasNext = diff > 1;
|
const hasNext = diff >= 1;
|
||||||
|
|
||||||
const hasStepPrev = current > 1 && !hasNext;
|
const hasStepPrev = current > 1 && !hasNext;
|
||||||
const hasStepNext = diff > 0 && !hasPrev;
|
const hasStepNext = diff >= 2 && !hasPrev;
|
||||||
|
|
||||||
const showRightEllipsis = diff > 2;
|
const showRightEllipsis = diff > 2;
|
||||||
const showLeftEllipsis = real > 2 && !showRightEllipsis;
|
const showLeftEllipsis = real > 2 && !showRightEllipsis;
|
||||||
|
Loading…
Reference in New Issue
Block a user