Skip to content

Commit

Permalink
Merge pull request #154 from DerrikMilligan/w-table-pagination-issue
Browse files Browse the repository at this point in the history
[w-table] Pagination issue
  • Loading branch information
antoniandre authored Mar 29, 2024
2 parents 36d9a21 + f441438 commit ba694c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wave-ui/components/w-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,11 @@ export default {
this.paginationConfig.itemsPerPage = itemsPerPage
itemsPerPage = itemsPerPage || this.paginationConfig.total // If `0`, take all the results.
this.paginationConfig.page = page || this.paginationConfig.page || 1
page = this.paginationConfig.page // Shorthand var for next lines.
total = this.paginationConfig.total // Shorthand var for next lines.
let p = this.paginationConfig.page // Shorthand var for next lines.
let t = this.paginationConfig.total // Shorthand var for next lines.
this.paginationConfig.start = 1
this.paginationConfig.end = total >= (itemsPerPage * page) ? (itemsPerPage * page) : (total % (itemsPerPage * page))
this.paginationConfig.pagesCount = Math.ceil(total / itemsPerPage)
this.paginationConfig.end = t>= (itemsPerPage * p) ? (itemsPerPage * p) : (t % (itemsPerPage * p))
this.paginationConfig.pagesCount = Math.ceil(t/ itemsPerPage)
}
if (page) this.goToPage(page)
},
Expand Down

0 comments on commit ba694c6

Please sign in to comment.