Allow custom pagination to display even with no pages #424
natepisarski
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a feature request for adding the option to use "custom" pagination even when no pages beyond the current one exist. This is a bit tough to describe but in practice it's really simple.
Right now this is the component that is used for pagination:
https://github.com/rappasoft/laravel-livewire-tables/blob/4ab0e49cc1edd776ed885e389320d9cf24f78beb/resources/views/tailwind/includes/pagination.blade.php
Because of this condition:
&& $rows->lastPage() > 1
it can mean that the style of the pagination that is shown will be different, depending on if there is 1 page or multiple pages.I would like there to be a override-able default that allows
->links()
to be called even if there are no pages. This way the style of the pagination can be consistent.Let me know if you think this is a worthwhile feature, and I'll send a merge request. What I was envisioning was something like this:
In
WithPerPagePagination.php
In
Pagination.blade.php
(please note that I'm not married to the name
useDefaultPagelessPagination
, it's just here for illustrative purposes. If you're not against this feature just let me know what this property should be called).Beta Was this translation helpful? Give feedback.
All reactions