now i tried to fetch a event on refresh
<script>
document.addEventListener('livewire:init', () => {
Livewire.on('refresh', (event) => {
const swiper = new Swiper('.swiper-wrapper', {
slidesPerView: 3,
spaceBetween: 30,
speed: 1000,
loop: true,
pagination: {
el: ".testimonial-active-02 .swiper-pagination",
clickable: true,
},
breakpoints: {
0: {
slidesPerView: 1,
},
768: {
slidesPerView: 2,
},
1200: {
slidesPerView: 4,
}
}
});
// update swiper
swiper.update();
});
});
</script>
#class
public function render()
{
$this->dispatch('refresh');
$reviews = ReviewModel::withoutTrashed()->with('customer')->get();
return view('livewire.review', compact('reviews'));
}
but still not works correctly imagine you scroll the reviews and the cards dancing when you scroll an refreshed