Skip to content

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 dfa63df commit ecda3d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/SearchBox.tsx
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 ecda3d3

Please sign in to comment.