F
Filamentβ€’16mo ago
pmkevinrudd

Refresh table from an echo event

Is there a way out of the box to listen for echo events on a table and have the table refresh when that event fires? What i'm trying to achieve is only when a record thats visible in the table or new is updated/created it causes a table to refresh. https://filamentphp.com/docs/3.x/tables/advanced#polling-table-content
Solution:
sweet! makes sense then
Jump to solution
6 Replies
LeandroFerreira
LeandroFerreiraβ€’16mo ago
are you using admin panel?
pmkevinrudd
pmkevinruddOPβ€’16mo ago
ye v3
LeandroFerreira
LeandroFerreiraβ€’16mo ago
maybe you can register an event on the ListPage
#[On('update-list')]
public function updateList()
{
//
}
#[On('update-list')]
public function updateList()
{
//
}
Listen for echo events and dispatch using @this.$dispatch('update-list') https://livewire.laravel.com/docs/events#dispatching-livewire-events-from-script-tags
Laravel
Events | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
pmkevinrudd
pmkevinruddOPβ€’16mo ago
ah true, is ListPage a full livewire component? guess i havent read the docs thoroughly enough πŸ˜„
LeandroFerreira
LeandroFerreiraβ€’16mo ago
yes, pages are livewire components
Solution
pmkevinrudd
pmkevinruddβ€’16mo ago
sweet! makes sense then
Want results from more Discord servers?
Add your server