You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior: The items range will jump to a negative number (e.g. -49 - 0 of 0) and you can go to a previous (negative) page with the arrow button
Environment details: Windows 10, Google Chrome
Possible Solution
Line 131 in src/components/Pagination/index.tsx: const maxPageCount = Math.ceil(total / size) - 1;
causes this issue, because for total == 0, the maxPageCount will be -1.
I already fixed and tested this and added more checks for this issue on other positions.
PR will come.
The text was updated successfully, but these errors were encountered:
Bug Report
Prerequisites
For more information, see the
CONTRIBUTING
guide.Versions
0.5.0
Description
When changing the items per page on empty content, the item range will jump to negative numbers and you can select negative page numbers.
Steps to Reproduce
Expected behavior: Nothing should happen
Actual behavior: The items range will jump to a negative number (e.g. -49 - 0 of 0) and you can go to a previous (negative) page with the arrow button
Environment details: Windows 10, Google Chrome
Possible Solution
Line 131 in src/components/Pagination/index.tsx:
const maxPageCount = Math.ceil(total / size) - 1;
causes this issue, because for total == 0, the maxPageCount will be -1.
I already fixed and tested this and added more checks for this issue on other positions.
PR will come.
The text was updated successfully, but these errors were encountered: