© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
10 replies
Ben

Action modal registered using render hook not trigger the modal

I have Livewire component that had an action modal in it. When I click the trigger button, its not trigger the modal. I checked the network tab, its actually dispatch the
close-modal
close-modal
instead of
open-modal
open-modal
.

If I put the button somewhere else (page header action, table header action) it works. How can I achieve this? I just wanted to have button trigger of the modal on topbar.

Here are the action snippet

public function addLinkAction(): Actions\Action
{
    return Actions\CreateAction::make("add-link")
        ->label(__('Add Link'))
        ->icon('heroicon-o-plus')
        ->size('lg')
        ->outlined()
        ->modalWidth('xl')
        ->extraAttributes(['class' => 'w-full'])
        ->mutateFormDataUsing(function (array $data): array {
            $data['user_id'] = Filament::auth()->id();

            return $data;
        })
        ->model(Link::class)
        ->after(function (self $livewire, Link $record) {
            $livewire->redirect(route('filament.app.pages.link', ['link' => $record]));
        })
        ->form([
            ... // forms
        ]);
}
public function addLinkAction(): Actions\Action
{
    return Actions\CreateAction::make("add-link")
        ->label(__('Add Link'))
        ->icon('heroicon-o-plus')
        ->size('lg')
        ->outlined()
        ->modalWidth('xl')
        ->extraAttributes(['class' => 'w-full'])
        ->mutateFormDataUsing(function (array $data): array {
            $data['user_id'] = Filament::auth()->id();

            return $data;
        })
        ->model(Link::class)
        ->after(function (self $livewire, Link $record) {
            $livewire->redirect(route('filament.app.pages.link', ['link' => $record]));
        })
        ->form([
            ... // forms
        ]);
}
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

Modal issue when using Render Hook PAGE_START
FilamentFFilament / ❓┊help
2y ago
Any way to hide Action trigger button but not the action modal ?
FilamentFFilament / ❓┊help
4mo ago
Action not trigger
FilamentFFilament / ❓┊help
2y ago
Action trigger close modal before open
FilamentFFilament / ❓┊help
3y ago