ソースを参照

Merge pull request #670 from djhvscf/master

Fix #667
文翼 10 年 前
コミット
eb40278ac3
2 ファイル変更4 行追加2 行削除
  1. 0 1
      src/bootstrap-table.css
  2. 4 1
      src/bootstrap-table.js

+ 0 - 1
src/bootstrap-table.css

@@ -13,7 +13,6 @@
 
 
 .bootstrap-table
 .bootstrap-table
 .table,
 .table,
-.table>thead>tr>th,
 .table>tbody>tr>th,
 .table>tbody>tr>th,
 .table>tfoot>tr>th,
 .table>tfoot>tr>th,
 .table>thead>tr>td,
 .table>thead>tr>td,

+ 4 - 1
src/bootstrap-table.js

@@ -988,7 +988,10 @@
                 this.options.pageSize = this.options.totalRows;
                 this.options.pageSize = this.options.totalRows;
                 $allSelected = true;
                 $allSelected = true;
             } else if (this.options.pageSize === this.options.totalRows) {
             } else if (this.options.pageSize === this.options.totalRows) {
-                var pageLst = this.options.pageList.replace('[', '').replace(']', '').replace(/ /g, '').toLowerCase().split(',');
+                // Fix #667 Table with pagination, multiple pages and a search that matches to one page throws exception
+                var pageLst = typeof this.options.pageList === 'string' ?
+                    this.options.pageList.replace('[', '').replace(']', '').replace(/ /g, '').toLowerCase().split(',') :
+                    this.options.pageList;
                 if (pageLst.indexOf(this.options.formatAllRows().toLowerCase()) > -1) {
                 if (pageLst.indexOf(this.options.formatAllRows().toLowerCase()) > -1) {
                     $allSelected = true;
                     $allSelected = true;
                 }
                 }