I don't know know if others run into this like I do, but it would be an enhancement I think would be useful.
Currently, you can set page_size, like say to 15 rows, and you can set can_set_page_size to true, but if you do, the dropdown list of page size choices still only has 20, 50, and 100. Currently the only way to override it is to copy and paste page_size_form from its layout and override it, by copy paste and tweak, to add different options. I think it would be really nice if the hard coded entries like this:
could be driven by a configuration variable that provides a list of integers as the desired entries, and prints out one of these for each entry n in the list:
<a class="dropdown-item{% if page_size == n %} active{% endif %}" href="{{ generator(n) }}">n {{ _gettext('items') }}</a>
I don't know know if others run into this like I do, but it would be an enhancement I think would be useful.
Currently, you can set
page_size
, like say to 15 rows, and you can setcan_set_page_size
to true, but if you do, the dropdown list of page size choices still only has 20, 50, and 100. Currently the only way to override it is to copy and pastepage_size_form
from its layout and override it, by copy paste and tweak, to add different options. I think it would be really nice if the hard coded entries like this:<a class="dropdown-item{% if page_size == 20 %} active{% endif %}" href="{{ generator(20) }}">20 {{ _gettext('items') }}</a>
could be driven by a configuration variable that provides a list of integers as the desired entries, and prints out one of these for each entry n in the list:
<a class="dropdown-item{% if page_size == n %} active{% endif %}" href="{{ generator(n) }}">n {{ _gettext('items') }}</a>