I want to overlay the floating panel over a map view and change the content depending on selection in the map view or in the ClubList().
My main problem is, that the .floatingPanelis not updated when I change the selectedLocation.
I tried to use the MyPanelCoordinator and see that the onUpdate method is called when I change the selectedLocation attribute. But how to I trigger the update of the .floatingPannel view?
Exemplary view.
MyMapView()
.floatingPanel(coordinator: MyPanelCoordinator.self) { proxy in
if selectedLocation == nil {
ClubList(selection: $selectedLocation)
.padding(.top, 15)
} else {
ClubDetailedMapView(club: selectedLocation)
.padding(.top, 15)
}
}