From b99838d214209ba7ae8c6a7e88a8ceb47bbfe964 Mon Sep 17 00:00:00 2001 From: Kevin Sivic Date: Mon, 1 Dec 2025 15:17:27 -0500 Subject: [PATCH] Fix map disappearing when selecting a business MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add phx-update="ignore" to prevent LiveView from overwriting the Leaflet map container when re-rendering after business selection. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- lib/localspot_web/live/business_live/map.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/localspot_web/live/business_live/map.ex b/lib/localspot_web/live/business_live/map.ex index c90285a..8ae648d 100644 --- a/lib/localspot_web/live/business_live/map.ex +++ b/lib/localspot_web/live/business_live/map.ex @@ -44,6 +44,7 @@ defmodule LocalspotWeb.BusinessLive.Map do id="map-container" class="w-full h-[600px] rounded-lg overflow-hidden relative" phx-hook="LeafletMap" + phx-update="ignore" data-businesses={Jason.encode!(map_businesses(@businesses))} data-center={Jason.encode!(%{lat: 39.9612, lng: -82.9988})} data-zoom="12"