Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
fix(docsearch): focus input on Selection Search
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Jul 23, 2020
1 parent dd25dae commit 9f1fa52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/docsearch-react/src/DocSearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ export function DocSearchModal({
React.useEffect(() => {
if (initialQuery.length > 0) {
refresh();

if (inputRef.current) {
inputRef.current.focus();
}
}
}, [initialQuery, refresh]);

Expand Down

0 comments on commit 9f1fa52

Please sign in to comment.