I use Livewire in a old Laravel application. In order not to redevelop the whole thing. I’m using Livewire components as soon as I can for new features. The loop on products include component :
@livewire('stock-alert', ['product' => $product, 'warehouseId' => $warehouse_id], key(rand() * $product->id))
In Javascript we have a load_more function like this :
function load_more(){
if(more == true) {
$(".load-more").show();
$.ajax({
url: '{{ route('dolibarr-shop-home') }}',
type:'get',
dataType:'html',
data:{
page:page
},
beforeSend:function(){
$(".load-more").show();
},
success:function(data){
if (data != 'false') {
$("#products > tbody:last-child").append(data);
$(".load-more").hide();
$('[data-toggle="tooltip"]').tooltip();
}else{
more = false;
$(".load-more").hide();
}
}
});
}
}
This is an animated GIF to see the problem. I think we should refresh Livewire how can I do ?