Skip to content

Commit 88ed1ff

Browse files
committed
Merge branch 'CristhoferMF-fix-bulk-actions-dropdown' into develop
2 parents a533a1a + 5852398 commit 88ed1ff

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

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">
2+
<div class="mb-3 mb-md-0" id="{{ $tableName }}-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="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="{{ $tableName }}-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="bulkActions">
8+
<div class="dropdown-menu dropdown-menu-right w-100" aria-labelledby="{{ $tableName }}-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">
2+
<div class="mb-3 mb-md-0" id="{{ $tableName }}-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="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="{{ $tableName }}-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="bulkActions">
8+
<div class="dropdown-menu dropdown-menu-end w-100" aria-labelledby="{{ $tableName }}-bulkActions">
99
@foreach($this->bulkActions as $action => $title)
1010
<a
1111
href="#"

src/DataTableComponent.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,22 @@ abstract class DataTableComponent extends Component
8080
public bool $responsive = true;
8181

8282
/**
83-
* Name of the page parameter for pagination
84-
* Good to change the default if you have more than one datatable on a page.
83+
* Unique name to use for this table if you want the 'per page' options to be remembered on a per table basis.
84+
* If not, all 'per page' stored in the session will default to the same option for every table with this default name.
85+
*
86+
* I.e. If the users changes it to 25 on the users table, the roles table will also default to 25, unless they have unique tableName's
8587
*
8688
* @var string
8789
*/
88-
protected string $pageName = 'page';
90+
public string $tableName = 'table';
8991

9092
/**
91-
* Unique name to use for this table if you want the 'per page' options to be remembered on a per table basis.
92-
* If not, all 'per page' stored in the session will default to the same option for every table with this default name.
93-
*
94-
* I.e. If the users changes it to 25 on the users table, the roles table will also default to 25, unless they have unique tableName's
93+
* Name of the page parameter for pagination
94+
* Good to change the default if you have more than one datatable on a page.
9595
*
9696
* @var string
9797
*/
98-
protected string $tableName = 'table';
98+
protected string $pageName = 'page';
9999

100100
/**
101101
* @var \null[][]

0 commit comments

Comments
 (0)