wire-elements / modal

Livewire component that provides you with a modal that supports multiple child modals while maintaining state.
MIT License
1.09k stars 129 forks source link

closeModalWithEvents() not working #420

Closed DonCamillo11 closed 4 months ago

DonCamillo11 commented 4 months ago

Hi, I have a modal from which I open a child modal. When saving, I want to close the modal using closeModalWithEvents() and update a select field in the parent modal. This always worked without any problems in others, but I can't get it to work with this one. In the child component I have

$this->closeModalWithEvents([
    JobTimeCreate::class => 'updateTaskList',
]);

and in the parent component

#[On('updateTaskList')]
public function updateTaskList(){
    $this->jobtasks = JobTask::where('job_id', $this->job_id)->orderBy('title')->get();
}

I figured out that this function never gets called. I don’t know why?