Nov 25, 2024
0
Level 2
Open edit modal on the basis of parameter in URL
I want to open edit modal in FriendsRelationshipManager on the User
If URL has parameter openEditModal=7 it should open edit modal of a Friend with id 7
I used mount() but it didn't worked, afterMount() is not even showing the logs
My current implementation
public $openEditModal = null;
public function afterMount(): void
{
if ($friendId = request()->query('openEditModal')) {
$this->dispatch('modal.edit-friend-' . $friendId);
}
}
Please or to participate in this conversation.