Explorar o código

reset page count on filter

Thomas Rabaix %!s(int64=13) %!d(string=hai) anos
pai
achega
54f0ec8ff8
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Resources/views/CRUD/base_list.html.twig

+ 4 - 0
Resources/views/CRUD/base_list.html.twig

@@ -178,6 +178,10 @@ file that was distributed with this source code.
                             {#</td>#}
                         </tr>
                     </table>
+
+                    <input type="hidden" name="filter[_page]" id="filter__page" value="1" />
+
+                    {% set foo = form.getChild('_page').setRendered() %}
                     {{ form_rest(form) }}
 
                     <input type="submit" class="btn primary" value="{% trans from 'SonataAdminBundle' %}btn_filter{% endtrans %}" />