Skip to content

Commit a437931

Browse files
authored
Merge pull request #20393 from netbox-community/20390-pagination-dropdown
Fixes #20390: Fix styling of pagination dropdown menu
2 parents 0fac8e6 + c8b3027 commit a437931

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

netbox/templates/inc/paginator.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,23 @@
7979
{# /Showing #}
8080

8181
{# Pagination options #}
82-
<nav class="text-end" aria-label="{% trans "Pagination options" %}">
82+
<nav aria-label="{% trans "Pagination options" %}">
8383
{% if page %}
84-
<div class="dropdown">
84+
<div class="dropdown dropdown-menu-end">
8585
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown">
8686
{% trans "Per Page" %}
8787
</button>
88-
<div class="dropdown-menu">
88+
<ul class="dropdown-menu">
8989
{% for n in page.paginator.get_page_lengths %}
90-
{% if htmx %}
91-
<a href="#" hx-get="{{ table.htmx_url }}{% querystring request per_page=n %}" class="dropdown-item">{{ n }}</a>
92-
{% else %}
93-
<a href="{% querystring request per_page=n %}" class="dropdown-item">{{ n }}</a>
94-
{% endif %}
90+
<li>
91+
{% if htmx %}
92+
<a href="#" hx-get="{{ table.htmx_url }}{% querystring request per_page=n %}" class="dropdown-item">{{ n }}</a>
93+
{% else %}
94+
<a href="{% querystring request per_page=n %}" class="dropdown-item">{{ n }}</a>
95+
{% endif %}
96+
</li>
9597
{% endfor %}
96-
</div>
98+
</ul>
9799
</div>
98100
{% endif %}
99101
</nav>

0 commit comments

Comments
 (0)