ソースを参照

Update getSelections

zhixin 6 年 前
コミット
e2aa0f1ad1
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/bootstrap-table.js

+ 2 - 2
src/bootstrap-table.js

@@ -528,7 +528,7 @@ class BootstrapTable {
         <button class="${this.constants.buttonsClass} dropdown-toggle" type="button" data-toggle="dropdown"
         aria-label="Columns" title="${o.formatColumns()}">
         ${o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.columns) : '' }
-        ${o.showButtonText ? o.formatColumns() : ''} 
+        ${o.showButtonText ? o.formatColumns() : ''}
         ${this.constants.html.dropdownCaret}
         </button>
         ${this.constants.html.toolbarDropdown[0]}`)
@@ -1956,7 +1956,7 @@ class BootstrapTable {
   }
 
   getAllSelections () {
-    return this.data.filter(row => row[this.header.stateField])
+    return this.options.data.filter(row => row[this.header.stateField] === true)
   }
 
   load (_data) {