From c62e29567ee35eeea1446c53916c97fbdc59e6d7 Mon Sep 17 00:00:00 2001 From: Gaelle <133775440+AltefrohneGaelle@users.noreply.github.com> Date: Tue, 7 Jan 2025 10:37:03 -0500 Subject: [PATCH] fix(quickfilter): SKFP-1417 search match issue (#4195) --- 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;