Elements per page setting is discarded after editing an object
Deployment Type
Self-hosted
NetBox Version
v4.3.3
Python Version
3.12
Steps to Reproduce
- Go into the "Interfaces" overview. This assumes that you have more than 25 interfaces.
- In the lower right corner, press the drop down "Per Page" and select that you wish to see 100 entries.
- Select two elements in this longer list, press "Edit Selected"
- Do the necessary changes and save.
- You're now being taken back to the "Interfaces" overview. You're back in the default view of 25 entries instead of 100.
Expected Behavior
I would expect that the setting remains active until I decide to leave the overview by explicitly navigating somewhere else.
Observed Behavior
As mentioned in "Steps to reproduce"
I was very tempted to argue that this is intended behavior (in that it doesn't seem to have ever been considered) and that a feature request should be filed, if this should be added. However, while triaging this, I noticed that we're handling this differently for per_page values above the default as we are below the default--which is odd.
I will dig in to the more in a bit.
To elaborate a bit on my comment from July, there's definitely some inconsistent behavior. For instance:
- If you select any of the predefined pagination sizes other than 100 (in my case, might be because of NetBox defaults or user preferences), then after a bulk edit, the pagination is reset back to 100.
- If you manually set the
per_pageGET param to (it appears) anything else, like?per_page=101,?per_page=99, or even?per_page=1, then the custom pagination is maintained after the bulk edit is completed. - Newly discovered just now, if you select one of the predefined pagination options, like say
500, after having set one manually like above, then you are redirected to the listing page and the previous manually set pagination number is used. In my case, I manually set?per_page=101, did an edit, then selected500on the list page I was redirected to, then did another edit, and was redirected to the list page again which showedShowing 1-101 of 1613and had?per_page=101in the URL.
So tl;dr, there's definitely a bug here. Opening it up for anyone that is interested. Apologies to all for letting it sit so long.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.