Asynchronicity
Symfony UX Turbo is a Symfony bundle integrating the Hotwire Turbo library in Symfony applications. It allows having the same user experience as with Single Page Apps but without having to write a single line of JavaScript!
This bundle provides integration that works out-of-the-box.
The magic part
Make sure your application uses the Symfony UX Turbo. You don't have to configure anything extra, your data tables automatically work asynchronously! The magic comes from the base template, which wraps the whole table in the <turbo-frame>
tag:
{# @KreyuDataTable/themes/base.html.twig #}
{% block kreyu_data_table %}
<turbo-frame id="kreyu_data_table_{{ name }}">
{# ... #}
</turbo-frame>
{% endblock %}
This ensures every data table is wrapped in its own frame, making them work asynchronously.
This integration also works on other built-in templates, because they all extend the base one. If you're making a data table theme from scratch, make sure the table is wrapped in the Turbo frame, as shown above.
For more information, see official documentation about the Turbo frames.