© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
11 replies
Venky

Table reload in custom livewire tab by updating in another tab table record.

I have a resource page with Tab implementation. First tab for draft items loaded through livewire page. The second tab is with published items. I wants to refresh the second table when ever I am publishing a record in First tab. Below is the main page
public function getTabs(): array
    {return [
       'All' => Tab::make('All')->schema([
       Livewire::make(ActiveListingTable::class)->key('active-listing-table')
       ]),
       ];
    }
    public function infolist(Infolist $infolist): Infolist
    {return $infolist
     ->schema([
     Tabs::make('Tabs')->contained(false)
     ->tabs([
        Tabs\Tab::make('Draft')
                            ->schema([
                                Livewire::make(DraftListingTable::class)->key('dradt-listing-table')->lazy()
                            ])->extraAttributes([
                                'x-data' => '{ isActive: false }',
                                'x-init' => 'isActive = ($el.closest("[role=\'tablist\']").querySelector("[aria-selected=\'true\']") === $el)',
                                'x-effect' => 'if(isActive) { window.Livewire.emit(\'refreshDraftTable\') }',
                                'x-on:click' => 'isActive = true',
                            ]),
                        Tabs\Tab::make('active-tasks')->label('Published')
                            ->schema([
                                Livewire::make(ActiveListingTable::class)->key('active-listing-table')->lazy()
                            ])->extraAttributes([
                                'x-data' => '{ isActive: false }',
                                'x-init' => 'isActive = ($el.closest("[role=\'tablist\']").querySelector("[aria-selected=\'true\']") === $el)',
                                'x-effect' => 'if(isActive) { window.Livewire.emit(\'refreshActiveTable\') }',
                                'x-on:click' => 'isActive = true',
                            ]),
    ]),
    ]);
    }
public function getTabs(): array
    {return [
       'All' => Tab::make('All')->schema([
       Livewire::make(ActiveListingTable::class)->key('active-listing-table')
       ]),
       ];
    }
    public function infolist(Infolist $infolist): Infolist
    {return $infolist
     ->schema([
     Tabs::make('Tabs')->contained(false)
     ->tabs([
        Tabs\Tab::make('Draft')
                            ->schema([
                                Livewire::make(DraftListingTable::class)->key('dradt-listing-table')->lazy()
                            ])->extraAttributes([
                                'x-data' => '{ isActive: false }',
                                'x-init' => 'isActive = ($el.closest("[role=\'tablist\']").querySelector("[aria-selected=\'true\']") === $el)',
                                'x-effect' => 'if(isActive) { window.Livewire.emit(\'refreshDraftTable\') }',
                                'x-on:click' => 'isActive = true',
                            ]),
                        Tabs\Tab::make('active-tasks')->label('Published')
                            ->schema([
                                Livewire::make(ActiveListingTable::class)->key('active-listing-table')->lazy()
                            ])->extraAttributes([
                                'x-data' => '{ isActive: false }',
                                'x-init' => 'isActive = ($el.closest("[role=\'tablist\']").querySelector("[aria-selected=\'true\']") === $el)',
                                'x-effect' => 'if(isActive) { window.Livewire.emit(\'refreshActiveTable\') }',
                                'x-on:click' => 'isActive = true',
                            ]),
    ]),
    ]);
    }
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

reload a Livewire form component after updating the record
FilamentFFilament / ❓┊help
2y ago
Get Table Record in Livewire Component
FilamentFFilament / ❓┊help
16mo ago
Closing table action modal by another livewire component
FilamentFFilament / ❓┊help
16mo ago
Table rendering in another resource tab
FilamentFFilament / ❓┊help
2y ago