symfony / ux

Symfony UX initiative: a JavaScript ecosystem for Symfony

Home Page:https://ux.symfony.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[LiveComponent] automatically refresh component

tito10047 opened this issue · comments

Hi,
It is possible to set timer for reload live component? I want component that is autmaticaly feetch new data from server every minute.

Has live component this feature or i need add custom controller for that.

The "data-poll" attribute is what you're looking for :)

https://symfony.com/bundles/ux-live-component/current/index.html#polling

<div
    {{ attributes }}
    data-poll="delay(500)|$render"
>