Skip to content

Commit

Permalink
Fixed filter not work bug with undefined for filter-control extension
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin committed Nov 13, 2019
1 parent 36473f6 commit 7a41821
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ChangeLog
- **Update:** Fixed `checkAll` event bug with sortable checkbox field.
- **Update:** Fixed checkbox and not-found td style errors.
- **Update:** Fixed `hideUnusedSelectOptions` not work bug for filter-control extension.
- **Update:** Fixed filter not work bug with `undefined` for filter-control extension.
- **Update:** Fixed `virtualScroll` option bug with treegrid extension.
- **Update:** Fixed input keyboard bug for mobile extension.
- **Update:** Fixed detail view column reorder bug for reorder-columns extension.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,11 @@ $.BootstrapTable = class extends $.BootstrapTable {
that.data = fp
? that.options.data.filter((item, i) => {
const itemIsExpected = []
Object.keys(item).forEach((x, index) => {
const key = that.header.fields[index]
const keys1 = Object.keys(item)
const keys2 = Object.keys(fp)
const keys = keys1.concat(keys2.filter(item => !keys1.includes(item)))

keys.forEach(key => {
const thisColumn = that.columns[that.fieldsColumnsIndex[key]]
const fval = (fp[key] || '').toLowerCase()
let value = Utils.getItemField(item, key, false)
Expand Down

0 comments on commit 7a41821

Please sign in to comment.