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()


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]);
    }
Was this page helpful?