F
Filament14mo ago
tesse05

open modal from another modal

I follow the steps given but I don't really know how to follow... from a RelationManager where and how I attach the modal view? https://filamentphp.com/docs/2.x/admin/pages/actions#getting-started On my RelationTable:
->extraModalActions([
\Filament\Tables\Actions\Modal\Actions\Action::make('preview')
->button()
->label(__('filament-export::export_action.preview_action_label'))
->color('secondary')
->icon(config('filament-export.preview_icon'))
->action('openPreviewModal'),
])
->slideOver()
->extraModalActions([
\Filament\Tables\Actions\Modal\Actions\Action::make('preview')
->button()
->label(__('filament-export::export_action.preview_action_label'))
->color('secondary')
->icon(config('filament-export.preview_icon'))
->action('openPreviewModal'),
])
->slideOver()
On my RelationManager:
public function openPreviewModal(): void
{
$recordId = $this->mountedTableActionRecord;
$emailExtraInfo = $this->mountedTableActionData['email_extra_info'];
$this->dispatchBrowserEvent('open-preview-modal', ['id' =>$recordId,'field' => $emailExtraInfo]);
}
public function openPreviewModal(): void
{
$recordId = $this->mountedTableActionRecord;
$emailExtraInfo = $this->mountedTableActionData['email_extra_info'];
$this->dispatchBrowserEvent('open-preview-modal', ['id' =>$recordId,'field' => $emailExtraInfo]);
}
2 Replies
toeknee
toeknee14mo ago
In the relation manage just use the actions section in the table?
Want results from more Discord servers?
Add your server