Skip to content

Commit 6e194c7

Browse files
authored
fix(v3): pass initialQuery (#1051)
1 parent 20f54c9 commit 6e194c7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/docsearch-react/src/DocSearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function DocSearch(props: DocSearchProps) {
3939
const searchButtonRef = React.useRef<HTMLButtonElement>(null);
4040
const [isOpen, setIsOpen] = React.useState(false);
4141
const [initialQuery, setInitialQuery] = React.useState<string | undefined>(
42-
undefined
42+
props?.initialQuery || undefined
4343
);
4444

4545
const onOpen = React.useCallback(() => {

0 commit comments

Comments
 (0)