if the data changes only on user input then no need to poll, however this will not fix your problem if you don't track the state of the dropdown. You could add wire: ignore to these?
Oct 3, 2021
2
Level 13
Polling but I only want to refresh certain parts (possible ?)
Hey 👋
I have a table inside a Livewire component where I'm using polling :
<div>
<div class="filter dropdown"></div>
<table>
<tr wire:poll.visible.1000ms>
<td></td>
</tr>
</table>
</div>
On top of the table, I have some filters with dropdowns (bootstrap). The problem is when the data is being polled, it refreshes the whole component, refreshing, at the same time the dropdown (and therefore closing them 1 second after I open them).
Is it possible to refresh only certain elements of the component during polling to avoid this behavior ?
Or maybe I shouldn't be using polling ?
Thanks for any advice on this !
Please or to participate in this conversation.