File tree Expand file tree Collapse file tree 9 files changed +30
-24
lines changed Expand file tree Collapse file tree 9 files changed +30
-24
lines changed Original file line number Diff line number Diff line change 1
- @if (count ($bulkActions ) )
1
+ @if ($bulkActionsEnabled && count ($bulkActions ) )
2
2
<div class =" dropdown mb-3 mb-md-0 d-block d-md-inline" >
3
3
<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
4
@lang (' Bulk Actions' )
Original file line number Diff line number Diff line change 1
- @if (count ($bulkActions ) && (($selectPage && $rows -> total () > $rows -> count ()) || count ($selected )) )
1
+ @if ($bulkActionsEnabled && count ($bulkActions ) && (($selectPage && $rows -> total () > $rows -> count ()) || count ($selected )) )
2
2
<x-livewire-tables::bs5 .table.row wire:key =" row-message" >
3
3
<x-livewire-tables::bs5 .table.cell colspan =" {{ $colspan } }" >
4
4
@if (count ($selected ) && ! $selectAll && ! $selectPage )
Original file line number Diff line number Diff line change 2
2
<div
3
3
x-cloak
4
4
x-data =" { open: false }"
5
- @ keydown.escape.stop =" open = false"
6
- @ mousedown.away =" open = false"
5
+ x-on: keydown.escape.stop =" open = false"
6
+ x-on: mousedown.away =" open = false"
7
7
class =" dropdown mb-3 mb-md-0 md-0 ms-md-3 d-block d-md-inline"
8
8
>
9
9
<button
10
- @ click =" open = !open"
10
+ x-on: click =" open = !open"
11
11
class =" btn dropdown-toggle d-block w-100 d-md-inline"
12
12
type =" button"
13
13
id =" columnSelect"
Original file line number Diff line number Diff line change 2
2
<div
3
3
x-cloak
4
4
x-data =" { open: false }"
5
- @ keydown.escape.stop =" open = false"
6
- @ mousedown.away =" open = false"
5
+ x-on: keydown.escape.stop =" open = false"
6
+ x-on: mousedown.away =" open = false"
7
7
class =" btn-group d-block d-md-inline"
8
8
>
9
9
<button
10
- @ click =" open = !open"
10
+ x-on: click =" open = !open"
11
11
type =" button"
12
12
class =" btn dropdown-toggle d-block w-100 d-md-inline"
13
13
>
@@ -50,7 +50,7 @@ class="dropdown-menu w-200 mt-3"
50
50
51
51
<button
52
52
wire:click.prevent =" resetFilters"
53
- @ click =" open = false"
53
+ x-on: click =" open = false"
54
54
class =" dropdown-item text-center"
55
55
>
56
56
@lang (' Clear' )
Original file line number Diff line number Diff line change 4
4
<x-livewire-tables::bs5 .table.heading />
5
5
@endif
6
6
7
- @if (count ($bulkActions ) )
7
+ @if ($bulkActionsEnabled && count ($bulkActions ) )
8
8
<x-livewire-tables::bs5 .table.heading >
9
9
<input
10
10
wire:model =" selectPage"
@@ -37,7 +37,7 @@ class="form-check-input"
37
37
<x-slot name =" body" >
38
38
@php
39
39
$colspan = count ($columns );
40
- if (count ($bulkActions )) $colspan ++ ;
40
+ if ($bulkActionsEnabled && count ($bulkActions )) $colspan ++ ;
41
41
if ($reordering ) $colspan ++ ;
42
42
@endphp
43
43
@@ -61,7 +61,7 @@ class="form-check-input"
61
61
</x-livewire-tables::bs5 .table.cell >
62
62
@endif
63
63
64
- @if (count ($bulkActions ) )
64
+ @if ($bulkActionsEnabled && count ($bulkActions ) )
65
65
<x-livewire-tables::bs5 .table.cell class =" align-middle" >
66
66
<input
67
67
wire:model =" selected"
@@ -78,7 +78,7 @@ class="form-check-input"
78
78
</x-livewire-tables::bs5 .table.row >
79
79
@empty
80
80
<x-livewire-tables::bs5 .table.row >
81
- <x-livewire-tables::bs5 .table.cell colspan =" {{ count ( $bulkActions ) ? count ( $columns ) + 1 : count ( $columns ) } } " >
81
+ <x-livewire-tables::bs5 .table.cell : colspan =" $colspan " >
82
82
@lang ($emptyMessage )
83
83
</x-livewire-tables::bs5 .table.cell >
84
84
</x-livewire-tables::bs5 .table.row >
Original file line number Diff line number Diff line change 3
3
<div
4
4
x-data =" { open: false }"
5
5
@keydown .window.escape =" open = false"
6
- @ click.away =" open = false"
6
+ x-on: click.away =" open = false"
7
7
class =" relative inline-block text-left z-10 w-full md:w-auto"
8
8
>
9
9
<div >
10
10
<span class =" rounded-md shadow-sm" >
11
11
<button
12
- @ click =" open = !open"
12
+ x-on: click =" open = !open"
13
13
type =" button"
14
14
class =" inline-flex justify-center w-full rounded-md border border-gray-300 px-4 py-2 bg-white text-sm leading-5 font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:border-indigo-300 focus:shadow-outline-indigo active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150"
15
15
id =" options-menu"
@@ -35,7 +35,7 @@ class="inline-flex justify-center w-full rounded-md border border-gray-300 px-4
35
35
x-transition:leave =" transition ease-in duration-75"
36
36
x-transition:leave-start =" transform opacity-100 scale-100"
37
37
x-transition:leave-end =" transform opacity-0 scale-95"
38
- class =" origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg z-50"
38
+ class =" origin-top-right absolute right-0 mt-2 w-full md:w- 48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100 focus:outline-none z-50"
39
39
>
40
40
<div class =" rounded-md bg-white shadow-xs" >
41
41
<div class =" py-1" role =" menu" aria-orientation =" vertical" aria-labelledby =" options-menu" >
Original file line number Diff line number Diff line change 3
3
<div
4
4
x-data =" { open: false }"
5
5
@keydown .window.escape =" open = false"
6
- @ click.away =" open = false"
7
- class =" relative inline-block text-left z-10 w-full md:w-auto"
6
+ x-on: click.away =" open = false"
7
+ class =" relative inline-block text-left w-full md:w-auto"
8
8
>
9
9
<div >
10
10
<span class =" rounded-md shadow-sm" >
11
11
<button
12
- @ click =" open = !open"
12
+ x-on: click =" open = !open"
13
13
type =" button"
14
14
class =" inline-flex justify-center w-full rounded-md border border-gray-300 px-4 py-2 bg-white text-sm leading-5 font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:border-indigo-300 focus:shadow-outline-indigo active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150"
15
15
id =" column-select-menu"
@@ -35,7 +35,7 @@ class="inline-flex justify-center w-full rounded-md border border-gray-300 px-4
35
35
x-transition:leave =" transition ease-in duration-75"
36
36
x-transition:leave-start =" transform opacity-100 scale-100"
37
37
x-transition:leave-end =" transform opacity-0 scale-95"
38
- class =" origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg z-50"
38
+ class =" origin-top-right absolute right-0 mt-2 w-full md:w- 48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100 focus:outline-none z-50"
39
39
>
40
40
<div class =" rounded-md bg-white shadow-xs" >
41
41
<div class =" p-2" role =" menu" aria-orientation =" vertical" aria-labelledby =" column-select-menu" >
Original file line number Diff line number Diff line change 1
1
@if ($filtersEnabled && $showFilterDropdown && ($filtersView || count ($customFilters )) )
2
2
<div
3
3
x-data =" { open: false }"
4
- @ keydown.escape.stop =" open = false"
5
- @ mousedown.away =" open = false"
4
+ x-on: keydown.escape.stop =" open = false"
5
+ x-on: mousedown.away =" open = false"
6
6
class =" relative block md:inline-block text-left"
7
7
>
8
8
<div >
9
9
<button
10
10
type =" button"
11
11
class =" inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:border-indigo-300 focus:shadow-outline-indigo"
12
12
id =" filters-menu"
13
- @ click =" open = !open"
13
+ x-on: click =" open = !open"
14
14
aria-haspopup =" true"
15
15
x-bind:aria-expanded =" open"
16
16
aria-expanded =" true"
@@ -71,7 +71,7 @@ class="block text-sm font-medium leading-5 text-gray-700">
71
71
<div class =" block px-4 py-2 text-sm text-gray-700" role =" menuitem" >
72
72
<button
73
73
wire:click.prevent =" resetFilters"
74
- @ click =" open = false"
74
+ x-on: click =" open = false"
75
75
type =" button"
76
76
class =" w-full inline-flex items-center justify-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
77
77
>
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ private function setReorderingProperties(): void
52
52
if ($ this ->hasReorderingSession ()) {
53
53
$ this ->reordering = true ;
54
54
$ this ->bulkActionsEnabled = false ;
55
+ $ this ->selectPage = false ;
56
+ $ this ->selectAll = false ;
57
+ $ this ->selected = [];
55
58
$ this ->showSorting = false ;
56
59
$ this ->sortingEnabled = false ;
57
60
$ this ->filtersEnabled = false ;
@@ -67,6 +70,9 @@ private function setReorderingProperties(): void
67
70
$ this ->reordering = false ;
68
71
$ this ->reset ([
69
72
'bulkActionsEnabled ' ,
73
+ 'selectPage ' ,
74
+ 'selectAll ' ,
75
+ 'selected ' ,
70
76
'showSorting ' ,
71
77
'sortingEnabled ' ,
72
78
'filtersEnabled ' ,
You can’t perform that action at this time.
0 commit comments