Skip to content

Commit

Permalink
feat(search): added matchpath to specify search location #352 from ee…
Browse files Browse the repository at this point in the history
…a/searchpopup_update
  • Loading branch information
ichim-david authored May 25, 2023
2 parents a5f64b9 + f4a40e0 commit 7c236d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/Header/HeaderSearchPopUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit 7c236d5

Please sign in to comment.