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
LeandroFerreira4mo 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
KoksAgentOP4mo ago
And what should go in your updatePage() because I update the Database in my custom widget in a class.
LeandroFerreira
LeandroFerreira4mo ago
$this->resetPage() ?
KoksAgent
KoksAgentOP4mo ago
Oh
LeandroFerreira
LeandroFerreira4mo ago
is it working?
KoksAgent
KoksAgentOP4mo ago
yes thank you
LeandroFerreira
LeandroFerreira4mo ago
mark as solved please
Want results from more Discord servers?
Add your server