From 813c1b25b0593fdf3adebf85d9bc0e889db3808a Mon Sep 17 00:00:00 2001 From: MYRONOV PAVLO Date: Sat, 14 Jan 2023 18:58:13 +0200 Subject: [PATCH] Fix for the issue "Query parameters are lost during filtering #739" (#751) --- src/Helper/Processor.php | 2 +- templates/Pagination/filtration.html.twig | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Helper/Processor.php b/src/Helper/Processor.php index a31bf660..22b83100 100644 --- a/src/Helper/Processor.php +++ b/src/Helper/Processor.php @@ -193,7 +193,7 @@ public function filter(SlidingPaginationInterface $pagination, array $fields, ar return \array_merge( $pagination->getPaginatorOptions() ?? [], $pagination->getCustomParameters() ?? [], - \compact('fields', 'action', 'filterFieldName', 'filterValueName', 'selectedField', 'selectedValue', 'options') + \compact('fields', 'action', 'filterFieldName', 'filterValueName', 'selectedField', 'selectedValue', 'options', 'params') ); } } diff --git a/templates/Pagination/filtration.html.twig b/templates/Pagination/filtration.html.twig index 18757da0..cc52e46d 100644 --- a/templates/Pagination/filtration.html.twig +++ b/templates/Pagination/filtration.html.twig @@ -9,7 +9,11 @@ {% else %} {% endif %} - + {% if params|length > 0 %} + {% for param, value in params %} + + {% endfor %} + {% endif %}