Skip to content

Commit dfa63df

Browse files
fix(docsearch): focus input on Selection Search
1 parent 533f187 commit dfa63df

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/DocSearchModal.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ export function DocSearchModal({
321321
React.useEffect(() => {
322322
if (initialQuery.length > 0) {
323323
refresh();
324+
325+
if (inputRef.current) {
326+
inputRef.current.focus();
327+
}
324328
}
325329
}, [initialQuery, refresh]);
326330

0 commit comments

Comments
 (0)