Skip to content

Commit

Permalink
hotfix(autocomplete): add missing onSubmit
Browse files Browse the repository at this point in the history
to navigate to the search page
  • Loading branch information
thecristen committed Nov 2, 2023
1 parent aae4e1d commit a76c19b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/site/assets/ts/ui/autocomplete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ function setupAlgoliaAutocomplete(container: HTMLElement): void {
},
openOnFocus: true,
onStateChange,
onSubmit({ state }) {
window.Turbolinks.visit(`/search?query=${state.query}`);
},
placeholder: "Search for routes, info, and more",
getSources: params => getSources(container.dataset, params),
renderer: reactRenderer
Expand Down

0 comments on commit a76c19b

Please sign in to comment.