Fix map disappearing when selecting a business
All checks were successful
CI - Test, Build, and Push / test (push) Successful in 2m46s
CI - Test, Build, and Push / build-and-push (push) Successful in 48s

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 <noreply@anthropic.com>
This commit is contained in:
Kevin Sivic 2025-12-01 15:17:27 -05:00
parent 2cf13e2cbb
commit b99838d214

View file

@ -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"