mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-27 04:40:35 +03:00
Try autofocus on search field
I commented this out for some reason that I forgot
This commit is contained in:
parent
bb1850a330
commit
3511ba760a
1 changed files with 1 additions and 3 deletions
|
@ -125,13 +125,11 @@ function Search(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// searchFieldRef.current?.focus?.();
|
|
||||||
// searchFormRef.current?.focus?.();
|
|
||||||
if (q) {
|
if (q) {
|
||||||
// searchFieldRef.current.value = q;
|
|
||||||
searchFormRef.current?.setValue?.(q);
|
searchFormRef.current?.setValue?.(q);
|
||||||
loadResults(true);
|
loadResults(true);
|
||||||
}
|
}
|
||||||
|
searchFormRef.current?.focus?.();
|
||||||
}, [q, type, instance]);
|
}, [q, type, instance]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue