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