浏览代码

Fix #1956

Added customSearch options
Example: http://jsfiddle.net/djhvscf/e3nk137y/4594/
Dennis Hernández 10 年之前
父节点
当前提交
5b2fe6a4b3
共有 1 个文件被更改,包括 6 次插入0 次删除
  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;