Skip to content

Commit

Permalink
Fixes #36469 - fix the pagination algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
ronlavi2412 committed Jan 2, 2024
1 parent b486520 commit 8480f71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webpack/helpers/pageParamsHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const useCurrentPagination = history => {
*/
export const pageToVars = ({ page, per_page }, totalCount = 0) => ({
first: page * per_page,
last: page > 1 && totalCount > 0 ? totalCount - per_page : per_page,
last: Math.min(per_page, totalCount - (page - 1) * per_page),
});

export const useParamsToVars = (history, totalCount) =>
Expand Down

0 comments on commit 8480f71

Please sign in to comment.