© 2026 Hedgehog Software, LLC

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

Refreshing table records after a page action

Currently using this implementation, which works technically but the notification animation isn't smooth, probably due to some re-rendering of the whole
ManagesPodcastEpisodes::class
ManagesPodcastEpisodes::class
, is there a way to only refresh records and not the whole thing?
// ManagesPodcastEpisodes::class
    protected $listeners = [
        'cache-cleared' => '$refresh',
    ];

    protected function getHeaderActions(): array
    {
        return [
            Action::make('forceRefresh')
                ->label('Force Refresh')
                ->action(function (): void {
                    Cache::forget(PodcastEpisode::CACHE_KEY);
                    // Sushi will handle the rest

                    Notification::make()
                        ->success()
                        ->title('Podcast episodes refreshed.')
                        ->send();

                    $this->dispatch('cache-cleared');
                }),
        ];
    }
// ManagesPodcastEpisodes::class
    protected $listeners = [
        'cache-cleared' => '$refresh',
    ];

    protected function getHeaderActions(): array
    {
        return [
            Action::make('forceRefresh')
                ->label('Force Refresh')
                ->action(function (): void {
                    Cache::forget(PodcastEpisode::CACHE_KEY);
                    // Sushi will handle the rest

                    Notification::make()
                        ->success()
                        ->title('Podcast episodes refreshed.')
                        ->send();

                    $this->dispatch('cache-cleared');
                }),
        ];
    }
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

Refreshing Table after Attach Action
FilamentFFilament / ❓┊help
2y ago
Refreshing parent page after an action in a relation table
FilamentFFilament / ❓┊help
3y ago
Preventing StatsOverviewWidget from refreshing after every table action
FilamentFFilament / ❓┊help
6mo ago