Browse Source

Fixed customSearch return empty array bug

zhixin 6 years ago
parent
commit
f3a84b028e
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/bootstrap-table.js

+ 7 - 1
src/bootstrap-table.js

@@ -1996,7 +1996,13 @@ class BootstrapTable {
 
 
   getData (params) {
   getData (params) {
     let data = this.options.data
     let data = this.options.data
-    if (this.searchText || this.options.sortName || !Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) {
+    if (
+      this.searchText ||
+      this.options.customSearch ||
+      this.options.sortName ||
+      !Utils.isEmptyObject(this.filterColumns) ||
+      !Utils.isEmptyObject(this.filterColumnsPartial)
+    ) {
       data = this.data
       data = this.data
     }
     }