浏览代码

go through the filtered data not through the whole data

Dustin Utecht 6 年之前
父节点
当前提交
69e31ad4aa
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/bootstrap-table.js

+ 2 - 3
src/bootstrap-table.js

@@ -1952,12 +1952,11 @@ class BootstrapTable {
 
   getSelections () {
     // fix #2424: from html with checkbox
-    return this.options.data.filter(row =>
-      row[this.header.stateField] === true)
+    return this.data.filter(row => row[this.header.stateField] === true)
   }
 
   getAllSelections () {
-    return this.options.data.filter(row => row[this.header.stateField])
+    return this.data.filter(row => row[this.header.stateField])
   }
 
   load (_data) {