Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ehben's avatar
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 !

0 likes
2 replies
Snapey's avatar

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?

1 like
ehben's avatar
Level 13

Thank you for your message.

The polling is needed as I'm pulling updates from the database (polling data from an external service) - it's not user input in this case.

Keeping the state of the dropdown could be a solution. Would need to track with wire:click I guess.

wire:ignore : interesting ! Will need to check further my use case to see if it's ok (as data inside the dropdown wouldn't be updated ?)

Please or to participate in this conversation.