diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index 3597258c8..c93526998 100644 Binary files a/netbox/project-static/dist/netbox.js and b/netbox/project-static/dist/netbox.js differ diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map index 2a643e478..f3dae3012 100644 Binary files a/netbox/project-static/dist/netbox.js.map and b/netbox/project-static/dist/netbox.js.map differ diff --git a/netbox/project-static/src/buttons.ts b/netbox/project-static/src/buttons.ts index f6f16a02c..3d78ad38c 100644 --- a/netbox/project-static/src/buttons.ts +++ b/netbox/project-static/src/buttons.ts @@ -265,6 +265,19 @@ function initSelectAll() { } } +function handlePerPageSelect(event: Event) { + const select = event.currentTarget as HTMLSelectElement; + if (select.form !== null) { + select.form.submit(); + } +} + +function initPerPage() { + for (const element of getElements('select.per-page')) { + element.addEventListener('change', handlePerPageSelect); + } +} + export function initButtons() { for (const func of [ initRackElevation, @@ -272,6 +285,7 @@ export function initButtons() { initReslug, initSelectAll, initPreferenceUpdate, + initPerPage, ]) { func(); } diff --git a/netbox/templates/inc/paginator.html b/netbox/templates/inc/paginator.html index 22a6a5420..d0e9a0339 100644 --- a/netbox/templates/inc/paginator.html +++ b/netbox/templates/inc/paginator.html @@ -35,7 +35,7 @@ {% endif %} {% endfor %}
- {% for n in settings.PER_PAGE_DEFAULTS %} {% endfor %}