Replies: 3 comments
-
You can edit as needed. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the clean wrapper on Shadcn Pagination. You had a 'lastPage' on the pre-current page components. It should have been a 1 (first page). I didn't like the extra ... between, for example, 1, ..., 3 . Now a ... captures >= 2 page value. This version is closer to the target example. I also parameterized the searchParam to support multiple tables on a page. Factored out URL string to respect other URL parameters. I also made the ellipsis clickable to the midpoint of the range. Posting an update for the lurkers.
This required a minor change to Shadcn PaginationEllipsis to make it a nextjs Link.
|
Beta Was this translation helpful? Give feedback.
-
I found https://gist.github.com/nicostombros/fc9a16a67fc47a536cf84736d0b8cfd8 to be helpful in implementing a fully-featured pagination component. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, It would be nice to extend the
<Pagination />
component to make it responsible for rendering the pagination items by itself, maybe by providing it with props such as: totalPages and maxItemsCount to achieve something like this:Beta Was this translation helpful? Give feedback.
All reactions