Skip to content

Commit 05a3d41

Browse files
authored
Fix for Collapsing Columns - Multiple Tables, Single Page (rappasoft#1678) (rappasoft#1679)
1 parent 67c6489 commit 05a3d41

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-livewire-tables` will be documented in this file
44

5+
## [v3.2.4] - 2024-03-01
6+
### Bug Fixes
7+
- Collapsing Columns fix when multiple tables are displayed on a page by @lrljoe
8+
59
## [v3.2.3] - 2024-03-01
610
### New Features
711
- Add capability to customise colors/styling on the Pagination Per-Page Dropdown by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1677

resources/views/components/table/collapsed-columns.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<tr
2626
x-data
27-
@toggle-row-content.window="$event.detail.row === {{ $rowIndex }} ? $el.classList.toggle('{{ $component->isBootstrap() ? 'd-none' : 'hidden' }}') : null"
27+
@toggle-row-content.window="($event.detail.tableName === '{{ $tableName }}' && $event.detail.row === {{ $rowIndex }}) ? $el.classList.toggle('{{ $component->isBootstrap() ? 'd-none' : 'hidden' }}') : null"
2828

2929
wire:key="{{ $tableName }}-row-{{ $row->{$this->getPrimaryKey()} }}-collapsed-contents"
3030
wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60"

resources/views/components/table/td/collapsed-columns.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@if (! $hidden)
1717
<button
1818
x-cloak x-show="!currentlyReorderingStatus"
19-
x-on:click.prevent="$dispatch('toggle-row-content', {'row': {{ $rowIndex }}}); open = !open"
19+
x-on:click.prevent="$dispatch('toggle-row-content', {'tableName': '{{ $tableName }}', 'row': {{ $rowIndex }}}); open = !open"
2020
>
2121
<x-heroicon-o-plus-circle x-cloak x-show="!open" class="text-green-600 h-6 w-6" />
2222
<x-heroicon-o-minus-circle x-cloak x-show="open" class="text-yellow-600 h-6 w-6" />
@@ -36,7 +36,7 @@
3636
@if (! $hidden)
3737
<button
3838
x-cloak x-show="!currentlyReorderingStatus"
39-
x-on:click.prevent="$dispatch('toggle-row-content', {'row': {{ $rowIndex }}});open = !open"
39+
x-on:click.prevent="$dispatch('toggle-row-content', {'tableName': '{{ $tableName }}', 'row': {{ $rowIndex }}});open = !open"
4040
class="p-0"
4141
style="background:none;border:none;"
4242
>

src/LaravelLivewireTablesServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class LaravelLivewireTablesServiceProvider extends ServiceProvider
1414
public function boot(): void
1515
{
1616

17-
AboutCommand::add('Rappasoft Laravel Livewire Tables', fn () => ['Version' => '3.2.3']);
17+
AboutCommand::add('Rappasoft Laravel Livewire Tables', fn () => ['Version' => '3.2.4']);
1818

1919
$this->mergeConfigFrom(
2020
__DIR__.'/../config/livewire-tables.php', 'livewire-tables'

0 commit comments

Comments
 (0)