Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(v2): avoid duplication search input in navbar #2762

Merged
merged 1 commit into from
May 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ const Search = (props) => {
inputSelector: '#search_input_react',
algoliaOptions: algolia.algoliaOptions,
autocompleteOptions: {
openOnFocus: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a bonus I set this option because it's quite useful from a UX point of view.
If a user closes the block with search suggestions (eg. blur event), then they click on the search input again, these results are immediately displayed, which is very convenient.

autoselect: false,
hint: false,
},
// Override algolia's default selection event, allowing us to do client-side
// navigation and avoiding a full page refresh.
Expand Down