When changing global search tab, focus input

Closes #3117
This commit is contained in:
Kalle
2026-05-30 10:42:49 +03:00
parent 874cd6eb7c
commit b30c3b9a65

View File

@@ -271,6 +271,10 @@ function GlobalSearchContent({
setSelectedWeapon(null);
};
const handleSearchTypeClick = () => {
inputRef.current?.focus();
};
const handleQueryChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value;
const separatorMatch = value.match(/^([a-zA-Z]+)\.$/);
@@ -354,6 +358,7 @@ function GlobalSearchContent({
key={type}
value={type}
className={styles.searchTypeRadioWrapper}
onClick={handleSearchTypeClick}
>
{({ isSelected, isHovered, isFocusVisible }) => (
<span