Skip to content

Commit a1fa077

Browse files
Commit from GitHub Actions (Applying autofixes)
1 parent 8cbab02 commit a1fa077

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

www/components/core/Search.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,12 @@ export const Search = ({ descriptors }: SearchParams) => {
9898

9999
function keyPressHandler(event: React.KeyboardEvent, index: number) {
100100
if (event.key === "ArrowDown" && index + 1 < (results?.length ?? 0)) {
101-
document.getElementById(`SearchResultItem_Link_${index+1}`)?.focus();
101+
document.getElementById(`SearchResultItem_Link_${index + 1}`)?.focus();
102102
event.preventDefault();
103103
} else if (event.key === "ArrowUp" && index >= 0) {
104-
const target = document.getElementById(index === 0 ? "Search_Input" : `SearchResultItem_Link_${index-1}`);
104+
const target = document.getElementById(
105+
index === 0 ? "Search_Input" : `SearchResultItem_Link_${index - 1}`,
106+
);
105107
target?.focus();
106108
event.preventDefault();
107109
}
@@ -128,7 +130,7 @@ export const Search = ({ descriptors }: SearchParams) => {
128130
to={`${result.obj.url}`}
129131
onClick={() => setSearchTerm("")}
130132
onKeyDown={(event) => keyPressHandler(event, ind)}
131-
>
133+
>
132134
<Match result={result} />
133135
</ItemLink>
134136
</SearchResultItem>

0 commit comments

Comments
 (0)