From f4a40e04f50e87f5b0383a1b28d3459a2b91199b Mon Sep 17 00:00:00 2001 From: Zoltan Szabo Date: Wed, 24 May 2023 14:52:42 +0300 Subject: [PATCH] added matchpath, we can independently specify on which location to apply a rule for the search popup --- src/ui/Header/HeaderSearchPopUp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/Header/HeaderSearchPopUp.js b/src/ui/Header/HeaderSearchPopUp.js index d1f49a9483..d27c5e7685 100644 --- a/src/ui/Header/HeaderSearchPopUp.js +++ b/src/ui/Header/HeaderSearchPopUp.js @@ -23,7 +23,7 @@ function HeaderSearchPopUp({ const headerSearchViews = headerSearchBox || []; const defaultView = headerSearchViews.filter((v) => v.isDefault); const localView = headerSearchViews.filter((v) => - location.pathname.includes(v.path), + location.pathname.match(v.matchpath ? v.matchpath : v.path), ); const activeView = localView.length > 0 ? localView[0] : defaultView[0];