fix: inline filter with html chars (#198)

Filtering with `&` doesn't work because it gets escaped in HTML.
This commit is contained in:
Ankush Menat 2024-04-17 19:02:02 +05:30 committed by GitHub
parent bed2708bd5
commit ecc660ed68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
},