Skip to content

Commit

Permalink
Fix edge case
Browse files Browse the repository at this point in the history
Thanks Alessio <3
  • Loading branch information
janvhs committed Jul 31, 2024
1 parent fa86d9b commit 9f28a08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/js/common/Table/Pagination.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ function Pagination({
// Can happen if the items per page get changed, while being on the last
// page
if (currentPage > pages) {
onSelect(pages);
// "what if pages is 0?"
// otherwise the user is always staying at page 0
onSelect(pages || 1);
}

return (
Expand Down

0 comments on commit 9f28a08

Please sign in to comment.