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

Commit

Permalink
fix(docsearch): don't blur input on submit
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Jul 23, 2020
1 parent 9f1fa52 commit 86da0fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/docsearch-react/src/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface SearchBoxProps
}

export function SearchBox(props: SearchBoxProps) {
const { onSubmit, onReset } = props.getFormProps({
const { onReset } = props.getFormProps({
inputElement: props.inputRef.current,
});

Expand All @@ -41,7 +41,9 @@ export function SearchBox(props: SearchBoxProps) {
role="search"
noValidate
className="DocSearch-Form"
onSubmit={onSubmit}
onSubmit={(event) => {
event.preventDefault();
}}
onReset={onReset}
>
<label className="DocSearch-MagnifierLabel" {...props.getLabelProps()}>
Expand Down

0 comments on commit 86da0fc

Please sign in to comment.