Skip to content

Commit

Permalink
Revert "feat(autocomplete): in trip planner, auto-select first result…
Browse files Browse the repository at this point in the history
… on enter (#2363)"

This reverts commit d95d7c3.
  • Loading branch information
thecristen committed Feb 5, 2025
1 parent d95d7c3 commit 1567cef
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions assets/ts/ui/autocomplete/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,6 @@ const TRIP_PLANNER = ({
onReset: (): void => {
pushToLiveView({});
},
onSubmit({ state, setQuery }) {
// Triggered by pressing enter on the input: selects the first result.
const results = state.collections.flatMap(collection => collection.items);
if (results.length > 0) {
const item = results[0];
// @ts-ignore
onSelect({ item, setQuery });
}
},
getSources({ query }) {
if (!query)
return debounced([
Expand Down

0 comments on commit 1567cef

Please sign in to comment.