This commit is contained in:
Francesco
2023-09-26 20:01:20 +02:00
parent 07ffca3ff2
commit 9091ba365a
7 changed files with 64 additions and 39 deletions

View File

@@ -46,15 +46,16 @@
<span class="fw-bold align-middle" th:text="${field.getName()}"></span>
</div>
<div class="card-body">
<!--/*--> Propagate queryParams containing other filters with hidden fields <!--*/-->
<th:block th:each="p : ${queryParams.keySet()}">
<input th:each="v : ${queryParams.get(p)}"
th:name="${p}" th:value="${v}" type="hidden"
th:if="${p.startsWith('filter_')}">
</th:block>
<!--/*--> Handle non categorical filter <!--*/-->
<th:block th:if="${!field.isFilterableCategorical()}">
<form action="" method="GET">
<!--/*--> Propagate queryParams containing other filters with hidden fields <!--*/-->
<th:block th:each="p : ${queryParams.keySet()}">
<input th:each="v : ${queryParams.get(p)}"
th:name="${p}" th:value="${v}" type="hidden"
th:if="${p.startsWith('filter_')}">
</th:block>
<div class="input-group pe-2">
<!-- Reset page when applying filter to start back at page 1 -->
<input type="hidden" name="page" value="1">
@@ -102,6 +103,13 @@
<ul class="categorical-select">
<li th:each="categoricalValue : ${field.getConnectedSchema().findAll()}">
<form action="" method="GET">
<!--/*--> Propagate queryParams containing other filters with hidden fields <!--*/-->
<th:block th:each="p : ${queryParams.keySet()}">
<input th:each="v : ${queryParams.get(p)}"
th:name="${p}" th:value="${v}" type="hidden"
th:if="${p.startsWith('filter_')}">
</th:block>
<!-- Reset page when applying filter to start back at page 1 -->
<input type="hidden" name="page" value="1">
<input type="hidden" name="pageSize" th:value="${page.getPagination().getPageSize()}">