Skip to content

Commit

Permalink
Issue #610: fix navigation token select
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzov96 committed Sep 28, 2023
1 parent f9c2d86 commit 067c0c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js-packages/search-frontend/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export function Search({
}
type="text"
placeholder={t("search") || "search..."}
value={btnSearch ? textBtn ?? '' : selectionsState.text}
value={btnSearch ? textBtn ?? "" : selectionsState.text}
onChange={(event) => {
if (!btnSearch) {
selectionsDispatch({
Expand Down Expand Up @@ -341,6 +341,7 @@ export function Search({
}
} else if (event.key === "Enter") {
event.preventDefault();
setTextBtn(option?.value);
if (span) {
if (isSearchOnInputChange) {
selectionsDispatch({
Expand Down Expand Up @@ -461,9 +462,9 @@ export function Search({
cursor: pointer;
`}
onClick={() => {
if(textBtn === '') {
if (textBtn === "") {
selectionsDispatch({
type: "reset-search"
type: "reset-search",
});
} else {
selectionsDispatch({
Expand All @@ -472,7 +473,6 @@ export function Search({
textOnchange: textBtn,
});
}

onDetail(null);
setOpenedDropdown(null);
}}
Expand Down

0 comments on commit 067c0c0

Please sign in to comment.