Skip to content

Commit

Permalink
fix #3713: Imrpoved pageList options to support localization
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin committed Mar 21, 2019
1 parent 474ab8c commit a9d9722
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion site/docs/api/table-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.

- **Detail:**

When set pagination property, initialize the page size selecting list. If you include the `'All'` or `'Unlimited'` option, all the records will be shown in your table.
When set pagination property, initialize the page size selecting list. If you include the `'all'` or `'unlimited'` option, all the records will be shown in your table.

- **Default:** `[10, 25, 50, 100]`

Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -1495,8 +1495,8 @@
pageList = []
for (const value of list) {
pageList.push(
(value.toUpperCase() === o.formatAllRows().toUpperCase() ||
value.toUpperCase() === 'UNLIMITED')
(value.toLowerCase() === o.formatAllRows().toLowerCase() ||
['all', 'unlimited'].includes(value.toLowerCase()))
? o.formatAllRows() : +value)
}
}
Expand Down

0 comments on commit a9d9722

Please sign in to comment.