Skip to content

Commit

Permalink
fix: String compare if hay is alphanumeric
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 authored and netchampfaris committed Jun 11, 2019
1 parent e25ef86 commit bbca6d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/filterRows.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})
Expand Down

0 comments on commit bbca6d8

Please sign in to comment.