Skip to content

Commit

Permalink
Fix wenzhixin#3087: only send pagination parameters when sidePaginati…
Browse files Browse the repository at this point in the history
…on is 'server'
  • Loading branch information
wenzhixin committed Jan 6, 2018
1 parent 19e9c27 commit 505c4e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@
params.sortName = this.header.sortNames[index];
}

if (this.options.pagination) {
if (this.options.pagination && this.options.sidePagination === 'server') {
params.pageSize = this.options.pageSize === this.options.formatAllRows() ?
this.options.totalRows : this.options.pageSize;
params.pageNumber = this.options.pageNumber;
Expand All @@ -2090,7 +2090,7 @@
order: params.sortOrder
};

if (this.options.pagination) {
if (this.options.pagination && this.options.sidePagination === 'server') {
params.offset = this.options.pageSize === this.options.formatAllRows() ?
0 : this.options.pageSize * (this.options.pageNumber - 1);
params.limit = this.options.pageSize === this.options.formatAllRows() ?
Expand Down

0 comments on commit 505c4e0

Please sign in to comment.