From b87572aa8132bf3d63a95ec1972aea62374180b5 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 31 Mar 2026 09:04:31 -0500 Subject: [PATCH] Close band dropdown after selection by shifting focus to map --- lib/microwaveprop_web/live/map_live.ex | 10 ++++++---- test/microwaveprop_web/live/map_live_test.exs | 7 ++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/microwaveprop_web/live/map_live.ex b/lib/microwaveprop_web/live/map_live.ex index 35e9431a..41513d19 100644 --- a/lib/microwaveprop_web/live/map_live.ex +++ b/lib/microwaveprop_web/live/map_live.ex @@ -28,8 +28,8 @@ defmodule MicrowavepropWeb.MapLive do end @impl true - def handle_event("select_band", %{"value" => band_str}, socket) do - band = String.to_integer(band_str) + def handle_event("select_band", %{"value" => band}, socket) do + band = if is_binary(band), do: String.to_integer(band), else: band scores = Propagation.latest_scores(band, socket.assigns.bounds) socket = @@ -105,8 +105,10 @@ defmodule MicrowavepropWeb.MapLive do >