Skip to content

Commit 3f66999

Browse files
committed
Undo property change
- Add random string to bulk id
1 parent 216e9a2 commit 3f66999

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
1212

1313
### Changed
1414

15-
- Made tableName property public so it can be accessed in views
1615
- Fixed bulk actions dropdown on Bootstrap - https://github.com/rappasoft/laravel-livewire-tables/pull/519
1716
- Fixed bulk row/select with pagination off - https://github.com/rappasoft/laravel-livewire-tables/issues/510
1817
- Conditionally show cursor-pointer class instead of inline style - https://github.com/rappasoft/laravel-livewire-tables/pull/529

resources/views/bootstrap-4/includes/bulk-actions.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
@if ($this->showBulkActionsDropdown)
2-
<div class="mb-3 mb-md-0" id="{{ $tableName }}-bulkActionsWrapper">
2+
<div class="mb-3 mb-md-0" id="{{ $bulkKey = \Illuminate\Support\Str::random() }}-bulkActionsWrapper">
33
<div class="dropdown d-block d-md-inline">
4-
<button class="btn dropdown-toggle d-block w-100 d-md-inline" type="button" id="{{ $tableName }}-bulkActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
4+
<button class="btn dropdown-toggle d-block w-100 d-md-inline" type="button" id="{{ $bulkKey }}-bulkActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
55
@lang('Bulk Actions')
66
</button>
77

8-
<div class="dropdown-menu dropdown-menu-right w-100" aria-labelledby="{{ $tableName }}-bulkActions">
8+
<div class="dropdown-menu dropdown-menu-right w-100" aria-labelledby="{{ $bulkKey }}-bulkActions">
99
@foreach($this->bulkActions as $action => $title)
1010
<a
1111
href="#"

resources/views/bootstrap-5/includes/bulk-actions.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
@if ($this->showBulkActionsDropdown)
2-
<div class="mb-3 mb-md-0" id="{{ $tableName }}-bulkActionsWrapper">
2+
<div class="mb-3 mb-md-0" id="{{ $bulkKey = \Illuminate\Support\Str::random() }}-bulkActionsWrapper">
33
<div class="dropdown d-block d-md-inline">
4-
<button class="btn dropdown-toggle d-block w-100 d-md-inline" type="button" id="{{ $tableName }}-bulkActions" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
4+
<button class="btn dropdown-toggle d-block w-100 d-md-inline" type="button" id="{{ $bulkKey }}-bulkActions" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
55
@lang('Bulk Actions')
66
</button>
77

8-
<div class="dropdown-menu dropdown-menu-end w-100" aria-labelledby="{{ $tableName }}-bulkActions">
8+
<div class="dropdown-menu dropdown-menu-end w-100" aria-labelledby="{{ $bulkKey }}-bulkActions">
99
@foreach($this->bulkActions as $action => $title)
1010
<a
1111
href="#"

src/DataTableComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ abstract class DataTableComponent extends Component
8787
*
8888
* @var string
8989
*/
90-
public string $tableName = 'table';
90+
protected string $tableName = 'table';
9191

9292
/**
9393
* Name of the page parameter for pagination

0 commit comments

Comments
 (0)