Skip to content

Commit

Permalink
fix(pagination): when total is 0 and pageSize change, current value i…
Browse files Browse the repository at this point in the history
…s 0 (#2937)
  • Loading branch information
betavs authored Nov 29, 2023
1 parent f1ba655 commit 5ff78fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pagination/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export default mixins(getConfigReceiverMixins<Vue, PaginationConfig>('pagination
}
const pageSize: number = parseInt(e, 10);
let pageCount = 1;
if (pageSize > 0) {
if (pageSize > 0 && this.total > 0) {
pageCount = Math.ceil(this.total / pageSize);
}

Expand Down

0 comments on commit 5ff78fc

Please sign in to comment.