I have a list where I show the values as follows:
> <a href="#" wire:click="edit({{ $idTariff }})" data-toggle="modal" data-target="#tarifarioModal">
> <span class="badge badge-warning" wire:model="tariffPrice.{{ $idTariff }}">{{ $tariffPrice }}</span>
> </a>
When I update a single list value, the entire list is updated. How to use a key to identify the exact element in the html?
In my controller class I have the following:
class TariffGeneral extends Component
{
public $idTariff;
public $tariffPrice;
public function newPrice($newPrice): void
{
$this->tariffPrice.$this->idTariff = $newPrice; --->> ????? How to do something like that ??
}
}