Browse Source

Merge pull request #5098 from wenzhixin/fix/5072

fixed comperasion with arrays
文翼 5 years ago
parent
commit
797d6cd70c

+ 6 - 1
src/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js

@@ -126,7 +126,12 @@ $.BootstrapTable = class extends $.BootstrapTable {
       // Check filter
       this.data = f ? this.options.data.filter((item, i) => {
         for (const key in f) {
-          if (item[key] !== f[key]) {
+          if (
+            (Array.isArray(f[key]) &&
+              !f[key].includes(item[key])) ||
+            (!Array.isArray(f[key]) &&
+              item[key] !== f[key])
+          ) {
             return false
           }
         }