Jan 31, 2024
0
Level 1
Component not found
I have the following scenario
-> Modal Component
|-> Display component
I am calling the modal component $dispatch('modal-view', { m_id: 1 }). Inside the modal component i am listening to the event modal-view and call the function as:
#[On('modal-view')]
public function update_display_data($m_id) {
$this->m_data = MResult::find($m_id);
}
Let's come to the view
<div>
@if ($m_data)
<livewire:m-display :md="$m_data" />
@endif
</div>
Now the issue: When it is shown the first time it works fine. The second time the modal will show <wire:id=.... >. The third time Component not found ....id....
I cannot seem to find what is causing this issue. If I remember correctly from before there is a way to preserve the component's ID right.. Any hint will be appreciated.
----UPDATE----
The same result happens for other components with a nested component from livewire
Please or to participate in this conversation.