Skip to content

Commit 3eeb4f6

Browse files
committed
Fixed bulk row/select with pagination off
1 parent 2d8dc57 commit 3eeb4f6

File tree

4 files changed

+43
-6
lines changed

4 files changed

+43
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
1414

1515
- Made tableName property public so it can be accessed in views
1616
- Fixed bulk actions dropdown on Bootstrap - https://github.com/rappasoft/laravel-livewire-tables/pull/519
17+
- Fixed bulk row/select with pagination off - https://github.com/rappasoft/laravel-livewire-tables/issues/510
1718

1819
## [1.19.3] - 2021-10-25
1920

resources/views/bootstrap-4/includes/bulk-select-row.blade.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
@if ($bulkActionsEnabled && count($this->bulkActions) && (($selectPage && $rows->total() > $rows->count()) || count($selected)))
1+
@if (
2+
$bulkActionsEnabled &&
3+
count($this->bulkActions) &&
4+
(
5+
(
6+
$paginationEnabled && (
7+
($selectPage && $rows->total() > $rows->count()) ||
8+
count($selected)
9+
)
10+
) ||
11+
count($selected)
12+
)
13+
)
214
<x-livewire-tables::bs4.table.row wire:key="row-message">
315
<x-livewire-tables::bs4.table.cell colspan="{{ $colspan }}">
4-
@if (count($selected) && !$selectAll && !$selectPage)
16+
@if ((!$paginationEnabled && $selectPage) || (count($selected) && $paginationEnabled && !$selectAll && !$selectPage))
517
<div>
618
<span>
719
@lang('You have selected')

resources/views/bootstrap-5/includes/bulk-select-row.blade.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
@if ($bulkActionsEnabled && count($this->bulkActions) && (($selectPage && $rows->total() > $rows->count()) || count($selected)))
1+
@if (
2+
$bulkActionsEnabled &&
3+
count($this->bulkActions) &&
4+
(
5+
(
6+
$paginationEnabled && (
7+
($selectPage && $rows->total() > $rows->count()) ||
8+
count($selected)
9+
)
10+
) ||
11+
count($selected)
12+
)
13+
)
214
<x-livewire-tables::bs5.table.row wire:key="row-message">
315
<x-livewire-tables::bs5.table.cell colspan="{{ $colspan }}">
4-
@if (count($selected) && !$selectAll && !$selectPage)
16+
@if ((!$paginationEnabled && $selectPage) || (count($selected) && $paginationEnabled && !$selectAll && !$selectPage))
517
<div>
618
<span>
719
@lang('You have selected')

resources/views/tailwind/includes/bulk-select-row.blade.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
@if ($bulkActionsEnabled && count($this->bulkActions) && (($selectPage && $rows->total() > $rows->count()) || count($selected)))
1+
@if (
2+
$bulkActionsEnabled &&
3+
count($this->bulkActions) &&
4+
(
5+
(
6+
$paginationEnabled && (
7+
($selectPage && $rows->total() > $rows->count()) ||
8+
count($selected)
9+
)
10+
) ||
11+
count($selected)
12+
)
13+
)
214
<x-livewire-tables::table.row wire:key="row-message" class="bg-indigo-50 dark:bg-gray-900 dark:text-white">
315
<x-livewire-tables::table.cell :colspan="$colspan">
4-
@if (count($selected) && !$selectAll && !$selectPage)
16+
@if ((!$paginationEnabled && $selectPage) || (count($selected) && $paginationEnabled && !$selectAll && !$selectPage))
517
<div>
618
<span>
719
@lang('You have selected')

0 commit comments

Comments
 (0)