Browse Source

Fix #77: After searching and then clearing the search field, table is no longer sortable.

zhixin 11 years ago
parent
commit
aff27e3c9c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/bootstrap-table.js

+ 2 - 2
src/bootstrap-table.js

@@ -530,8 +530,8 @@
     };
 
     BootstrapTable.prototype.initSearch = function () {
-        if (this.searchText && this.options.sidePagination !== 'server') {
-            var s = this.searchText.toLowerCase();
+        if (this.options.sidePagination !== 'server') {
+            var s = this.searchText && this.searchText.toLowerCase();
 
             this.data = s ? $.grep(this.options.data, function (item) {
                 for (var key in item) {