Skip to content

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 533f187 commit dfa63df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DocSearchModal.tsx
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 dfa63df

Please sign in to comment.