diff --git a/lib/components/form/user-settings.js b/lib/components/form/user-settings.js index 699ba6de3..e72c770ac 100644 --- a/lib/components/form/user-settings.js +++ b/lib/components/form/user-settings.js @@ -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 }) }