Skip to content

Commit

Permalink
Resolved an issue with active "Next" button when "all rows" is select…
Browse files Browse the repository at this point in the history
…ed; (#198)
  • Loading branch information
teertz authored and xaksis committed Mar 6, 2018
1 parent e71d45b commit 4be7fda
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,18 @@
let first = (this.currentPage - 1) * this.currentPerPage ? (this.currentPage - 1) * this.currentPerPage : 1;
if (first > this.total) {
// this probably happened as a result of filtering
// this probably happened as a result of filtering
this.currentPage = 1;
first = 1;
}
const last = Math.min(this.total, this.currentPerPage * this.currentPage);
return `${first} - ${last} ${this.ofText} ${this.total}`;
},
nextIsPossible() {
return (this.total > this.currentPerPage * this.currentPage);
return this.currentPerPage === -1
? false
: (this.total > this.currentPerPage * this.currentPage);
},
prevIsPossible() {
return this.currentPage > 1;
Expand Down

0 comments on commit 4be7fda

Please sign in to comment.