-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I'm using filament-map-picker inside a Repeater::make('locations') field, displayed with Tab::make for each location.
The problem is that when rendering multiple maps in the form, the marker for each map is always set to the location of the last map in the repeater. Each tab should show its own marker corresponding to its location, but currently, all maps show the same marker.
Example setup:
Repeater::make('locations')
->schema([
Tab::make('Location Info')
->schema([
Map::make('location')
->afterStateHydrated(function ($record, Map $component): void {
$component->state([
'lat' => $record?->latitude ?? 52.229676,
'lng' => $record?->longitude ?? 21.012229,
]);
})
// other fields...
])
])
Expected behavior:
- Each map should display a marker at its own saved location.
Actual behavior:
- Every map displays a marker at the location of the last entry in the repeater.
It seems like the map picker is not properly scoped to each repeater item.
Metadata
Metadata
Assignees
Labels
No labels