-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix tailwind pagination view #284
Conversation
1) Eliminated the if block that wrapped the whole view because the view script should display its contents regardless of whether pagination is enabled or not. This is because it's also responsible for displaying the result count. 2) Fixed the links() logic to check $showPagination and not $showPerPage. Show Per Page's effect should be isolated to the per page select element, not whether the pagination links should be displayed.
What's the use case here? Also, the other templates would be unchanged but have the same issue as you are trying to fix. But I feel like we've gone back and forth with the wrapping if statement and I don't remember why haha. |
The use case is that I have a table, with pagination, but I don't need to show the per-page dropdown. The current behavior is If showPerPage is false then pagination links are hidden. I forget as well. I think the last time I touched it the goal was to display the result count regardless of whether pagination was enabled or not. This behavior was a little different on the tailwind theme since the bootstrap links() displayed the count reliably while tailwind didn't. |
What about the $showPerPage property? |
I would expect the showPerPage property to be limited to showing/hiding the
per page drop-down.
…On Fri, May 14, 2021, 3:59 PM Anthony Rappa ***@***.***> wrote:
What about the $showPerPage
<https://github.com/rappasoft/laravel-livewire-tables/wiki/Display>
property?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2BHP7JSAAMFF6ZZLALC23TNV6K5ANCNFSM44434ZWA>
.
|
What if we just changed it to: @if ($showPagination)
<div class="p-6 md:p-0">
@if ($paginationEnabled && $rows->lastPage() > 1)
{{ $rows->links() }}
@else
<p class="text-sm text-gray-700 leading-5">
@lang('Showing')
<span class="font-medium">{{ $rows->count() }}</span>
@lang('results')
</p>
@endif
</div>
@endif |
Sure. |
No description provided.