We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 397e321 commit 63fe796Copy full SHA for 63fe796
1 file changed
src/components/Search.tsx
@@ -73,6 +73,13 @@ export default function SearchBar({ searchList }: Props) {
73
}
74
}, [inputVal]);
75
76
+ useEffect(() => {
77
+ // focus on text input when search bar is displayed
78
+ if (inputRef.current) {
79
+ inputRef.current.focus();
80
+ }
81
+ }, [inputVal]);
82
+
83
return (
84
<>
85
<label className="relative block">
0 commit comments