Skip to content

Fix Recent Trips Actions #1369

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

Merged
merged 6 commits into from
Apr 7, 2025
6 changes: 5 additions & 1 deletion lib/components/form/user-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,11 @@ const TripRequest = ({
// In previous versions of this code, tripRequest.id was passed to setQueryParam,
// however that causes an extra entry to be added to the recent searches on click,
// in addition to the entry added when clicking the "Plan" (magnifying glass) button.
setQueryParam(query)

// Also, exclude the mode and date/time setting of the the selected search
// to not overwrite settings the user was using prior to this action.
const { date, departArrive, modes, time, ...queryWithoutModes } = query
setQueryParam(queryWithoutModes)
if (query.modeButtons) {
setUrlSearch({ modeButtons: query.modeButtons })
}
Expand Down
Loading