Skip to content

Commit

Permalink
fix: Make the first "Depart at" button active when selecting an itine…
Browse files Browse the repository at this point in the history
…rary group (#2282)
  • Loading branch information
joshlarson authored Dec 20, 2024
1 parent 0cbca4e commit f7db31e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/dotcom_web/live/trip_planner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,11 @@ defmodule DotcomWeb.Live.TripPlanner do
points: itinerary_groups_to_points(socket.assigns.results.itinerary_groups, index)
}

new_results = %{itinerary_group_selection: index, itinerary_selection: 0}

new_socket =
socket
|> assign(:results, Map.put(socket.assigns.results, :itinerary_group_selection, index))
|> assign(:results, Map.merge(socket.assigns.results, new_results))
|> assign(:map, Map.merge(socket.assigns.map, new_map))

{:noreply, new_socket}
Expand Down

0 comments on commit f7db31e

Please sign in to comment.