Skip to content

Commit

Permalink
Fix pagination per-page form not working properly with Turbo (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreyu authored Nov 29, 2024
1 parent 7336204 commit 7e78e53
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Resources/views/themes/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@
{% block pagination_per_page_message 'Items per page'|trans %}

{% block pagination_per_page_form %}
<form>
{% set form_attr = { 'data-turbo-frame': '_self' }|merge(form_attr ?? {}) %}

<form {% with { attr: form_attr } %}{{ block('attributes') }}{% endwith %}>
{% set url_query_parameters = [] %}

{#
Expand All @@ -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({})) %}

Expand Down

0 comments on commit 7e78e53

Please sign in to comment.