From dfa63df4d08563ca0ecd758ac9b437797ac4f4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Thu, 23 Jul 2020 10:41:51 +0200 Subject: [PATCH] fix(docsearch): focus input on Selection Search --- src/DocSearchModal.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DocSearchModal.tsx b/src/DocSearchModal.tsx index 7755595eb..20ce8af17 100644 --- a/src/DocSearchModal.tsx +++ b/src/DocSearchModal.tsx @@ -321,6 +321,10 @@ export function DocSearchModal({ React.useEffect(() => { if (initialQuery.length > 0) { refresh(); + + if (inputRef.current) { + inputRef.current.focus(); + } } }, [initialQuery, refresh]);