ソースを参照

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) {