8000 fix(js): remove page size and number when pagination is false · Robothan/bootstrap-table@398b0a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 398b0a1

Browse files
committed
fix(js): remove page size and number when pagination is false
1 parent 304ff71 commit 398b0a1

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/bootstrap-table.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,15 +1905,13 @@
19051905
},
19061906
request;
19071907

1908-
if(this.options.pagination) {
1908+
if (this.options.pagination) {
19091909
params.pageSize = this.options.pageSize === this.options.formatAllRows() ?
19101910
this.options.totalRows : this.options.pageSize;
19111911
params.pageNumber = this.options.pageNumber;
1912-
} else {
1913-
params.pageSize = this.options.totalRows;
19141912
}
19151913

1916-
if (!this.options.url && !this.options.ajax) {
1914+
if (!(url || this.options.url) && !this.options.ajax) {
19171915
return;
19181916
}
19191917

@@ -1923,14 +1921,12 @@
19231921
sort: params.sortName,
19241922
order: params.sortOrder
19251923
};
1926-
params.offset = this.options.pageSize === this.options.formatAllRows() ?
1927-
0 : this.options.pageSize * (this.options.pageNumber - 1);
19281924

19291925
if (this.options.pagination) {
1926+
params.offset = this.options.pageSize === this.options.formatAllRows() ?
1927+
0 : this.options.pageSize * (this.options.pageNumber - 1);
19301928
params.limit = this.options.pageSize === this.options.formatAllRows() ?
19311929
this.options.totalRows : this.options.pageSize;
1932-
} else {
1933-
params.limit = this.options.totalRows;
19341930
}
19351931
}
19361932

0 commit comments

Comments
 (0)
0