fix(warningArea): paginator first page is negative

This commit is contained in:
Bowen Tan 2022-07-07 10:43:13 +08:00
parent b2e64b8273
commit 7becca2c34

View File

@ -38,7 +38,7 @@ export const Pagination: React.FC<Props> = ({
endIdx = ShowPagesNumber;
}
if (currentPage + 3 >= lastPage) {
startIdx = lastPage - ShowPagesNumber;
startIdx = Math.max(0, lastPage - ShowPagesNumber);
endIdx = lastPage;
}