Skip to content

Commit

Permalink
fix: inline filter with html chars (#198)
Browse files Browse the repository at this point in the history
Filtering with `&` doesn't work because it gets escaped in HTML.
  • Loading branch information
ankush committed Apr 17, 2024
1 parent bed2708 commit ecc660e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/filterRows.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ function getFilterMethod(rows, allData, filter) {
contains(keyword, cells) {
return cells
.filter(cell => {
const hay = stringCompareValue(cell);
const needle = (keyword || '').toLowerCase();
return !needle || hay.includes(needle);
return !needle ||
(cell.content || '').toLowerCase().includes(needle) ||
stringCompareValue(cell).includes(needle);
})
.map(cell => cell.rowIndex);
},
Expand Down

0 comments on commit ecc660e

Please sign in to comment.