FilamentF
Filament3y ago
5 replies
Daniel Reales

No refresh component

I have the following hook when starting the panel:
FilamentView::registerRenderHook(
    'panels::body.end',
    fn (): string => Blade::render('@livewire(\'cash-desk-closing.check-last-closing\')'),
);


The modal opens and everything works correctly. In this modal, I have a form that also creates a record correctly, and I have two events, one to close the modal and another to call another component:

$this->dispatch('updateTicket');
$this->dispatch('close-modal', id: 'check-last-closing');


This call $this->dispatch('updateTicket'); does not work.

In the component where I want this event to be called, I have the following:

protected $listeners = ['updateTicket' => '$refresh'];
`

But it does nothing. In other parts of the application, I have the same functionality and it works correctly, but I do it through an action passing the Component $livewire, and from here, I emit the event.

Why might this be happening to me?
Was this page helpful?