From b0f21df97f7c222fd1ccd1cfa5614885c0550116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Wr=C3=B3blewski?= Date: Fri, 29 Nov 2024 21:13:00 +0100 Subject: [PATCH] Fix pagination per-page form not working properly with Turbo --- src/Resources/views/themes/base.html.twig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Resources/views/themes/base.html.twig b/src/Resources/views/themes/base.html.twig index fb6787e9..20e39499 100755 --- a/src/Resources/views/themes/base.html.twig +++ b/src/Resources/views/themes/base.html.twig @@ -208,7 +208,9 @@ {% block pagination_per_page_message 'Items per page'|trans %} {% block pagination_per_page_form %} -
+ {% set form_attr = { 'data-turbo-frame': '_self' }|merge(form_attr ?? {}) %} + + {% set url_query_parameters = [] %} {# @@ -230,7 +232,7 @@ {% set select_attr = { name: data_table.vars.per_page_parameter_name, - onchange: 'this.form.submit()', + onchange: 'this.form.requestSubmit()', autocomplete: 'off', }|merge(select_attr|default({})) %}