© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
trovster

Extra modal actions, trigger edit modal action and open link

I have a simple resource that has view and edit screens appearing as modal, using the
->actions()
->actions()
method. I have added two buttons to the footer of the modal, but I can't work out how to trigger their actions.

I want the “View” button to open the resources' permalink in a new tab. And I want the “Edit” button to open the
EditAction
EditAction
modal action – the
getUrl
getUrl
doesn't work because there is no edit page, just the modal.

Tables\Actions\ViewAction::make()
    ->color('info')
    ->modalCancelAction(false)
    ->extraModalFooterActions(fn (Tables\Actions\ViewAction $action): array => [
        $action->makeModalAction('view')
            ->color('info')
            ->icon('heroicon-m-eye')
            ->url(static fn (Model $model): string => $model->permalink)
            ->openUrlInNewTab(),

        $action->makeModalAction('edit')
            ->color('warning')
            ->icon('heroicon-m-pencil-square')
            // ->url(static fn (Model $model): string => self::getUrl('edit', ['resource' => $model]))
            ,
    ]),

Tables\Actions\EditAction::make(),
Tables\Actions\ViewAction::make()
    ->color('info')
    ->modalCancelAction(false)
    ->extraModalFooterActions(fn (Tables\Actions\ViewAction $action): array => [
        $action->makeModalAction('view')
            ->color('info')
            ->icon('heroicon-m-eye')
            ->url(static fn (Model $model): string => $model->permalink)
            ->openUrlInNewTab(),

        $action->makeModalAction('edit')
            ->color('warning')
            ->icon('heroicon-m-pencil-square')
            // ->url(static fn (Model $model): string => self::getUrl('edit', ['resource' => $model]))
            ,
    ]),

Tables\Actions\EditAction::make(),
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Action trigger close modal before open
FilamentFFilament / ❓┊help
3y ago
Edit modal actions
FilamentFFilament / ❓┊help
3y ago
Open Edit modal from Action Group
FilamentFFilament / ❓┊help
2y ago
Open modal from edit table action
FilamentFFilament / ❓┊help
3y ago