8000 Show upper number in pageList display. · diegobdev/bootstrap-table@458c720 · GitHub
[go: up one dir, main page]

Skip to content

Commit 458c720

Browse files
committed
Show upper number in pageList display.
If totalRows is 45 and pageList is [25,50,100], we should be able to display the 45 rows. Instead of that, we only can display 25 max, because 45 is not >= 50.
1 parent d3bf82a commit 458c720

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap-table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@
780780
}
781781

782782
$.each(pageList, function (i, page) {
783-
if (!that.options.smartDisplay || that.options.totalRows >= page || i === 0) {
783+
if (!that.options.smartDisplay || i === 0 || pageList[i-1] <= that.options.totalRows) {
784784
var active = page === that.options.pageSize ? ' class="active"' : '';
785785
pageNumber.push(sprintf('<li%s><a href="javascript:void(0)">%s</a></li>', active, page));
786786
}

0 commit comments

Comments
 (0)
0