Browse Source

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

Dustin Utecht 3 years ago
parent
commit
1aa03741ba
1 changed files with 4 additions and 1 deletions
  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