Browse Source

Fix #1956

Added customSearch options
Example: http://jsfiddle.net/djhvscf/e3nk137y/4594/
Dennis Hernández 10 years ago
parent
commit
5b2fe6a4b3
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/bootstrap-table.js

+ 6 - 0
src/bootstrap-table.js

@@ -324,6 +324,8 @@
             detailClose: 'glyphicon-minus icon-minus'
         },
 
+        customSearch: $.noop,
+
         rowStyle: function (row, index) {
             return {};
         },
@@ -1114,6 +1116,10 @@
         var that = this;
 
         if (this.options.sidePagination !== 'server') {
+            if (this.options.customSearch !== $.noop) {
+                this.options.customSearch.apply(this, [this.searchText]);
+                return;
+            }
             var s = this.searchText && this.searchText.toLowerCase();
             var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns;