Refresh Table after performed action in Widget

How do I refresh the List page of a resource after I performed an action in a Widget on the List page
Solution:
add in your ListPage ```php use Livewire\Attributes\On; ...
Jump to solution
9 Replies
Solution
LeandroFerreira
LeandroFerreira2mo ago
add in your ListPage
use Livewire\Attributes\On;

#[On('updatePage')]
public function updatePage(): void
{
//...
}
use Livewire\Attributes\On;

#[On('updatePage')]
public function updatePage(): void
{
//...
}
use in your action
$this->dispatch('updatePage');
$this->dispatch('updatePage');
KoksAgent
KoksAgent2mo ago
And what should go in your updatePage() because I update the Database in my custom widget in a class.
LeandroFerreira
LeandroFerreira2mo ago
$this->resetPage() ?
KoksAgent
KoksAgent2mo ago
Oh
LeandroFerreira
is it working?
KoksAgent
KoksAgent5w ago
yes thank you
LeandroFerreira
mark as solved please
Want results from more Discord servers?
Add your server