Skip to content

Commit

Permalink
ssue-302: use "ontology" as search parameter id
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Lagrimas committed Aug 11, 2023
1 parent d427713 commit e247570
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/components/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default function SearchBox({
let autocompleteElements = autocompleteToShow.map(
(autocomplete, i): SearchBoxEntry => {
searchParams.set("q", autocomplete.autosuggest);
if (ontologyId) searchParams.set("ontologyId", ontologyId);
if (ontologyId) searchParams.set("ontology", ontologyId);
const linkUrl = `/search?${new URLSearchParams(searchParams)}`;
return {
linkUrl,
Expand Down Expand Up @@ -330,7 +330,7 @@ export default function SearchBox({
navigate(allDropdownElements[arrowKeySelectedN].linkUrl);
} else if (query) {
searchParams.set("q", query);
if (ontologyId) searchParams.set("ontologyId", ontologyId);
if (ontologyId) searchParams.set("ontology", ontologyId);
navigate(`/search?${new URLSearchParams(searchParams)}`);
}
} else if (ev.key === "ArrowDown") {
Expand Down Expand Up @@ -385,7 +385,7 @@ export default function SearchBox({
if (query) {
searchParams.set("q", query);
if (ontologyId)
searchParams.set("ontologyId", ontologyId);
searchParams.set("ontology", ontologyId);
navigate(`/search?${new URLSearchParams(searchParams)}`);
}
}}
Expand Down

0 comments on commit e247570

Please sign in to comment.