Browse Source

Merge pull request #6298 from wenzhixin/fix/6121

Fix/6121
Dustin Utecht 3 years ago
parent
commit
f1e97c4f12

+ 1 - 1
src/bootstrap-table.js

@@ -210,7 +210,7 @@ class BootstrapTable {
 
     this.options.columns.forEach((columns, i) => {
       columns.forEach((_column, j) => {
-        const column = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, _column)
+        const column = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, _column, { passed: _column })
 
         if (typeof column.fieldIndex !== 'undefined') {
           this.columns[column.fieldIndex] = column

+ 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