I just wonder if there is way to go to the top of Page after calling ‘$refresh’ component.
$this->emit('$refresh');
I call this for refresh in livewire component .
Thanks.
I just wonder if there is way to go to the top of Page after calling ‘$refresh’ component.
$this->emit('$refresh');
I call this for refresh in livewire component .
Thanks.
Hey, @bingglex
You can add a listener in your blade page.
<script>
Livewire.on('$refresh', () => {
window.scrollTo({
top: 15,
left: 15,
behaviour: 'smooth'
})
})
</script>