Skip to content

Commit 4bbf22e

Browse files
authored
fixing tailwind pagination display options
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.
1 parent afbff0c commit 4bbf22e

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
@if ($showPagination)
2-
<div class="p-6 md:p-0">
3-
@if ($paginationEnabled && $showPerPage && $rows->lastPage() > 1)
4-
{{ $rows->links() }}
5-
@else
6-
<p class="text-sm text-gray-700 leading-5">
7-
@lang('Showing')
8-
<span class="font-medium">{{ $rows->count() }}</span>
9-
@lang('results')
10-
</p>
11-
@endif
12-
</div>
13-
@endif
1+
<div class="p-6 md:p-0">
2+
@if ($paginationEnabled && $showPagination && $rows->lastPage() > 1)
3+
{{ $rows->links() }}
4+
@else
5+
<p class="text-sm text-gray-700 leading-5">
6+
@lang('Showing')
7+
<span class="font-medium">{{ $rows->count() }}</span>
8+
@lang('results')
9+
</p>
10+
@endif
11+
</div>

0 commit comments

Comments
 (0)