Try autofocus on search field

I commented this out for some reason that I forgot
This commit is contained in:
Lim Chee Aun 2023-09-04 00:07:11 +08:00
parent bb1850a330
commit 3511ba760a

View file

@ -125,13 +125,11 @@ function Search(props) {
}
useEffect(() => {
// searchFieldRef.current?.focus?.();
// searchFormRef.current?.focus?.();
if (q) {
// searchFieldRef.current.value = q;
searchFormRef.current?.setValue?.(q);
loadResults(true);
}
searchFormRef.current?.focus?.();
}, [q, type, instance]);
return (