From bbca6d8f60993de27663af879e6ed9c9e9a0a86c Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Tue, 11 Jun 2019 15:27:22 +0530 Subject: [PATCH] fix: String compare if hay is alphanumeric --- src/filterRows.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/filterRows.js b/src/filterRows.js index 659b462..f4849ce 100644 --- a/src/filterRows.js +++ b/src/filterRows.js @@ -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); })