Skip to content

Commit ecc660e

Browse files
authored
fix: inline filter with html chars (#198)
Filtering with `&` doesn't work because it gets escaped in HTML.
1 parent bed2708 commit ecc660e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/filterRows.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ function getFilterMethod(rows, allData, filter) {
6868
contains(keyword, cells) {
6969
return cells
7070
.filter(cell => {
71-
const hay = stringCompareValue(cell);
7271
const needle = (keyword || '').toLowerCase();
73-
return !needle || hay.includes(needle);
72+
return !needle ||
73+
(cell.content || '').toLowerCase().includes(needle) ||
74+
stringCompareValue(cell).includes(needle);
7475
})
7576
.map(cell => cell.rowIndex);
7677
},

0 commit comments

Comments
 (0)