What seems to be the problem:
Array rested when I call the function.
Code :
public $tranche_items = [];
public function updatedQte($value,$index){
$this->index = $index;
$this->count_rows[$index] = $value;
if($this->produit[0]->mode_vente_id === 1){
$this->tranches_stock = StockPoidsPc::select()->where('produit_id', $this->produit_id)->where('tranche_id', $index)->limit($value)->get();
}
else if($this->produit[0]->mode_vente_id === 2){
$this->tranches_stock = StockKgPc::select()->where('produit_id', $this->produit_id)->where('tranche_id', $index)->limit($value)->get();
}
foreach ($this->tranches_stock as $item){
array_push($this->tranche_items, $item);
}
}
Steps to Reproduce:
Are you using the latest version of Livewire: Yes
Do you have any screenshots or code examples: