Modal Dispatch
I'm using this modal and edit action , so modal shows calendar data and when I click on data it dispatch modal which I want to edit , what would be right approach because what I'm doing is not working
Component page
<x-filament::modal id="edit-user">
<x-slot name="trigger">
{{$calendarData[$time][$technician->name]}}
</x-slot>
<div>
<!-- Calendar Data -->
<h2>{{$calendarData[$time][$technician->name]}}</h2>
<!-- Edit Action -->
{{($this->editAction($calendarData[$time][$technician->name]))}}
<x-filament-actions::modals />
</div>
</x-filament::modal>
<x-filament::modal id="edit-user">
<x-slot name="trigger">
{{$calendarData[$time][$technician->name]}}
</x-slot>
<div>
<!-- Calendar Data -->
<h2>{{$calendarData[$time][$technician->name]}}</h2>
<!-- Edit Action -->
{{($this->editAction($calendarData[$time][$technician->name]))}}
<x-filament-actions::modals />
</div>
</x-filament::modal>
public function openModal()
{
$this->dispatch('open-modal',
['id' => 'edit-user',
]); }
public function openModal()
{
$this->dispatch('open-modal',
['id' => 'edit-user',
]); }
public function editAction(): Action
{
return Action::make('edit')
->form([
TextInput::make('ticket')
])
->action(function (array $data) {
dd($data);
\\
});
}
public function editAction(): Action
{
return Action::make('edit')
->form([
TextInput::make('ticket')
])
->action(function (array $data) {
dd($data);
\\
});
}
0 Replies