Sometimes autofocus ain't working
This commit is contained in:
parent
523cb09912
commit
07d1734720
1 changed files with 1 additions and 0 deletions
|
@ -27,6 +27,7 @@ function Search() {
|
||||||
const [accountResults, setAccountResults] = useState([]);
|
const [accountResults, setAccountResults] = useState([]);
|
||||||
const [hashtagResults, setHashtagResults] = useState([]);
|
const [hashtagResults, setHashtagResults] = useState([]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
searchFieldRef.current?.focus?.();
|
||||||
if (q) {
|
if (q) {
|
||||||
searchFieldRef.current.value = q;
|
searchFieldRef.current.value = q;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue