© 2026 Hedgehog Software, LLC

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

How to close an ActionGroup dropdown with a custom action function

Is it possible to close the dropdown generated by an ActionGroup, when a custom function is called?

Currently the dropdown will stay open after clicking on the action. I'm sure I'm missing something simple.

Sample ViewRecord page below.

class ViewPost extends ViewRecord
{
    protected static string $resource = PostResource::class;
    
    protected function getActions(): array
    {
        return [
            Actions\ActionGroup::make([
                Actions\Action::make('publish-post')
                    ->label('Publish blog post')
                    ->action('publishPost'),
                // other items ...
            ]),
        ];
    }
    
    public function publishPost()
    {
        $this->record->publish();

        // hide the dropdown
    }
}
class ViewPost extends ViewRecord
{
    protected static string $resource = PostResource::class;
    
    protected function getActions(): array
    {
        return [
            Actions\ActionGroup::make([
                Actions\Action::make('publish-post')
                    ->label('Publish blog post')
                    ->action('publishPost'),
                // other items ...
            ]),
        ];
    }
    
    public function publishPost()
    {
        $this->record->publish();

        // hide the dropdown
    }
}


Any help is much appreciated!
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

How to close an ActionGroup dropdown with a custom function after the function completes
FilamentFFilament / ❓┊help
2y ago
Infolist ActionGroup Dropdown
FilamentFFilament / ❓┊help
3y ago
Close dropdown after action completes
FilamentFFilament / ❓┊help
3y ago
ActionGroup Action caching custom view
FilamentFFilament / ❓┊help
9mo ago