Skip to content

Commit

Permalink
Merge pull request #783 from autonomys/bug/pageCountIsWrong
Browse files Browse the repository at this point in the history
We always miss the last page if the total % pageSize > 0
  • Loading branch information
marc-aurele-besner authored Jul 31, 2024
2 parents 65fc29f + b1ea0a3 commit 0810d96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion explorer/src/utils/table.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const countTablePages = (totalCount: number, pageSize: number) =>
Math.max(1, Math.floor(totalCount / pageSize))
Math.max(1, Math.floor(totalCount / pageSize)) + (totalCount % pageSize > 0 ? 1 : 0)

0 comments on commit 0810d96

Please sign in to comment.