Browse Source

go through the filtered data not through the whole data

Dustin Utecht 6 years ago
parent
commit
69e31ad4aa
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/bootstrap-table.js

+ 2 - 3
src/bootstrap-table.js

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