fix: String compare if hay is alphanumeric

This commit is contained in:
Deepesh Garg 2019-06-11 15:27:22 +05:30 committed by Faris Ansari
parent e25ef86a63
commit bbca6d8f60

View File

@ -111,7 +111,10 @@ function getFilterMethod(filter) {
containsNumber(keyword, cells) {
return cells
.filter(cell => {
const hay = numberCompareValue(cell);
let hay = numberCompareValue(cell);
if (isNaN(hay)) {
hay = stringCompareValue(cell);
}
const needle = keyword;
return !needle || hay.toString().includes(needle);
})