Skip to content

Commit c99e835

Browse files
committed
Added missing showPagination conditional to views.
1 parent ab927ca commit c99e835

File tree

4 files changed

+60
-53
lines changed

4 files changed

+60
-53
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
99
- Added Unselect All button on bulk row when selecting page.
1010
- Added disabled delay on select checkboxes.
1111
- Added disabled on bulk row button clicks.
12+
- Added missing showPagination conditional to views.
1213

1314
### Changed
1415

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
@if ($paginationEnabled && $showPerPage && $rows->lastPage() > 1)
2-
<div class="row">
3-
<div class="col-12 col-md-6">
4-
{{ $rows->links() }}
5-
</div>
1+
@if ($showPagination)
2+
@if ($paginationEnabled && $showPerPage && $rows->lastPage() > 1)
3+
<div class="row">
4+
<div class="col-12 col-md-6">
5+
{{ $rows->links() }}
6+
</div>
67

7-
<div class="col-12 col-md-6 text-center text-md-right text-muted">
8-
@lang('Showing')
9-
<strong>{{ $rows->count() ? $rows->firstItem() : 0 }}</strong>
10-
@lang('to')
11-
<strong>{{ $rows->count() ? $rows->lastItem() : 0 }}</strong>
12-
@lang('of')
13-
<strong>{{ $rows->total() }}</strong>
14-
@lang('results')
8+
<div class="col-12 col-md-6 text-center text-md-right text-muted">
9+
@lang('Showing')
10+
<strong>{{ $rows->count() ? $rows->firstItem() : 0 }}</strong>
11+
@lang('to')
12+
<strong>{{ $rows->count() ? $rows->lastItem() : 0 }}</strong>
13+
@lang('of')
14+
<strong>{{ $rows->total() }}</strong>
15+
@lang('results')
16+
</div>
1517
</div>
16-
</div>
17-
@else
18-
<div class="row">
19-
<div class="col-12 text-muted">
20-
@lang('Showing')
21-
<strong>{{ $rows->count() }}</strong>
22-
@lang('results')
18+
@else
19+
<div class="row">
20+
<div class="col-12 text-muted">
21+
@lang('Showing')
22+
<strong>{{ $rows->count() }}</strong>
23+
@lang('results')
24+
</div>
2325
</div>
24-
</div>
26+
@endif
2527
@endif
Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
@if ($paginationEnabled && $showPerPage && $rows->lastPage() > 1)
2-
<div class="row">
3-
<div class="col-12 col-md-6">
4-
{{ $rows->links() }}
5-
</div>
1+
@if ($showPagination)
2+
@if ($paginationEnabled && $showPerPage && $rows->lastPage() > 1)
3+
<div class="row">
4+
<div class="col-12 col-md-6">
5+
{{ $rows->links() }}
6+
</div>
67

7-
<div class="col-12 col-md-6 text-center text-md-end text-muted">
8-
@lang('Showing')
9-
<strong>{{ $rows->count() ? $rows->firstItem() : 0 }}</strong>
10-
@lang('to')
11-
<strong>{{ $rows->count() ? $rows->lastItem() : 0 }}</strong>
12-
@lang('of')
13-
<strong>{{ $rows->total() }}</strong>
14-
@lang('results')
8+
<div class="col-12 col-md-6 text-center text-md-end text-muted">
9+
@lang('Showing')
10+
<strong>{{ $rows->count() ? $rows->firstItem() : 0 }}</strong>
11+
@lang('to')
12+
<strong>{{ $rows->count() ? $rows->lastItem() : 0 }}</strong>
13+
@lang('of')
14+
<strong>{{ $rows->total() }}</strong>
15+
@lang('results')
16+
</div>
1517
</div>
16-
</div>
17-
@else
18-
<div class="row">
19-
<div class="col-12 text-muted">
20-
@lang('Showing')
21-
<strong>{{ $rows->count() }}</strong>
22-
@lang('results')
18+
@else
19+
<div class="row">
20+
<div class="col-12 text-muted">
21+
@lang('Showing')
22+
<strong>{{ $rows->count() }}</strong>
23+
@lang('results')
24+
</div>
2325
</div>
24-
</div>
26+
@endif
2527
@endif
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
<div class="p-6 md:p-0">
2-
@if ($paginationEnabled && $showPerPage && $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>
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

0 commit comments

Comments
 (0)