I tried to update the modal after button click using wire:click, it change the value but somehow not shown
livewire code
public function openEdit($id)
{
$this->model = Customer::find($id);
$this->district = $this->model->district;
$this->name = $this->model->name;
$this->model_name = $this->name;
$this->phone = $this->model->phone;
$this->address = $this->model->address;
$this->internet_id = $this->model->internet_id;
$this->admin_id = $this->model->admin_id;
$this->dispatch('default-internet', Internet::all(), $this->model->internet_id);
$this->dispatch('default-admin', User::all(), $this->model->admin_id);
}
and for blade
<input type="text" wire:model="name" value="{{ $name }}" class="bg-gray-50
border
border-gray-300 text-gray-900 text-sm rounded-lg
focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-600
dark:border-gray-500 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500
dark:focus:border-primary-500" placeholder="" />
here is the result
enter image description here
I tried replicate it but without modal, it work just fine, so I dont know that Im mising
New contributor
khalid yoga is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.