jowilf / starlette-admin

Fast, beautiful and extensible administrative interface framework for Starlette & FastApi applications
https://jowilf.github.io/starlette-admin/
MIT License
632 stars 59 forks source link

Enhancement: pagination should include some middle numbers #509

Open sglebs opened 9 months ago

sglebs commented 9 months ago

Is your feature request related to a problem? Please describe.

image

It is very tedious no navigate when a large number of pages exists. I can't jump back 100 at a time, for example. Either I see the last few ones or the very few first ones. Middle ones are not available.

Describe the solution you'd like I see 2 options:

1) Render some midpoint values. So, if there are 300 pages, it should show 1,2...150,151,...299,300 This allows for a "binary search"to convert to a page, because you can also move back or forward, eliminating 1/2 of the search space when paginating.

2) Add << and >> buttons which paginate a larger number of pages forward or backwards

Describe alternatives you've considered If these limits were passed in the URL I would have been able to workaround, but that s not the case.

Additional context None.

jowilf commented 3 months ago

I found this interesting plugin (https://datatables.net/plug-ins/pagination/input)