1
votes

I have an error when showing the data I do not see the problem because the data does not want to show it I hope you can help me.

this my event click on table its work display my modal

<td>
  <a href="#" wire:click.prevent="edit({{$pais->id}})" data-toggle="modal" data-target="#update_pais">
    <i class="fa fa-search text-warning"></i>
  </a>
</td>

This is my component function edit

public $testNew;

public function edit(Pais $pais)
{
    $this->testNew = '324234234234';
}

this my input

<input wire:model="testNew" type="text">

when click data doesn't show and input is empty on network show data is correct

1
is the model binding work? did you check the $pais variable passed in to edit function. there could be an error on that so testNew isn't updatedIrfan

1 Answers

1
votes

Have you tried adding a value attribute to your input?

<input wire:model="testNew" type="text" value="{{ $testNew }}">