Refresh sidebar doesn't work

For my sidebar navigation item I only want to show the badge when a certain condition is true. I specified that condition in the Settings page class. When I try to refresh the sidebar on form save, this doesn't do anything. Any idea's on why this doesn't work properly?
public function getSaveFormAction(): Action
{
return parent::getSaveFormAction()
->dispatch('refresh-sidebar');
}
public function getSaveFormAction(): Action
{
return parent::getSaveFormAction()
->dispatch('refresh-sidebar');
}
Solution:
Dispatch the event from afterSave()
Jump to solution
3 Replies
Solution
Dan Harrin
Dan Harrin3w ago
Dispatch the event from afterSave()
Kaaiman
KaaimanOP3w ago
Thank you @Dan Harrin , that works. Is there also an easy way to discover existing component names/events that are available in Filament/their components?
Dan Harrin
Dan Harrin3w ago
All events and hooks that are publicly available are documented I think

Did you find this page helpful?