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\')'),
);
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->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'];
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?
0 Replies
No replies yetBe the first to reply to this messageJoin