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
are you using admin panel?
pmkevinrudd
pmkevinruddOP2y ago
ye v3
LeandroFerreira
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
pmkevinruddOP2y ago
ah true, is ListPage a full livewire component? guess i havent read the docs thoroughly enough 😄
LeandroFerreira
yes, pages are livewire components
Solution
pmkevinrudd
pmkevinrudd2y ago
sweet! makes sense then

Did you find this page helpful?