浏览代码

Set the filterStrictSearch option to true by default for filter control
selects if the passed options was not false

Dustin Utecht 3 年之前
父节点
当前提交
1aa03741ba
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/extensions/filter-control/bootstrap-table-filter-control.js

+ 4 - 1
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -290,7 +290,10 @@ $.BootstrapTable = class extends $.BootstrapTable {
   isValueExpected (searchValue, value, column, key) {
     let tmpItemIsExpected = false
 
-    if (column.filterStrictSearch) {
+    if (
+      column.filterStrictSearch ||
+      (column.filterControl === 'select' && column.passed.filterStrictSearch !== false)
+    ) {
       tmpItemIsExpected = value.toString().toLowerCase() === searchValue.toString().toLowerCase()
     } else if (column.filterStartsWithSearch) {
       tmpItemIsExpected = (`${value}`).toLowerCase().indexOf(searchValue) === 0