From 2659648354306255e51ce83e83580f958941613f Mon Sep 17 00:00:00 2001 From: GaelleA Date: Tue, 7 Jan 2025 10:31:11 -0500 Subject: [PATCH] fix(quickfilter): SKFP-1417 search match issue --- src/views/DataExploration/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/DataExploration/index.tsx b/src/views/DataExploration/index.tsx index e39bde296..de14f5b34 100644 --- a/src/views/DataExploration/index.tsx +++ b/src/views/DataExploration/index.tsx @@ -327,7 +327,7 @@ const DataExploration = () => { const label = capitalize(facetValueMapping?.[bucket.key]) || titleCase(bucket.key); const index = getIndexFromQFValueFacet(key); - if (regexp.exec(label)) { + if (label.match(regexp)) { ++totalResult; bucketFiltered.push({ key: bucket.key, @@ -340,7 +340,7 @@ const DataExploration = () => { } }); - const isFacetNameMatch = regexp.exec(facetName); + const isFacetNameMatch = facetName.match(regexp); if (isFacetNameMatch || bucketFiltered.length > 0) { if (isFacetNameMatch) ++totalResult;