Skip to content

Commit 4613827

Browse files
committed
Fix BS4 reorder divs
1 parent b5d4871 commit 4613827

File tree

3 files changed

+58
-55
lines changed

3 files changed

+58
-55
lines changed

resources/views/bootstrap-4/datatable.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ class="container-fluid p-0"
3030
</div>
3131

3232
<div class="d-md-flex">
33-
@include('livewire-tables::bootstrap-4.includes.bulk-actions')
34-
@include('livewire-tables::bootstrap-4.includes.column-select')
35-
@include('livewire-tables::bootstrap-4.includes.per-page')
33+
<div>@include('livewire-tables::bootstrap-4.includes.bulk-actions')</div>
34+
<div>@include('livewire-tables::bootstrap-4.includes.column-select')</div>
35+
<div>@include('livewire-tables::bootstrap-4.includes.per-page')</div>
3636
</div>
3737
</div>
3838

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
@if ($bulkActionsEnabled && count($bulkActions))
2-
<div class="dropdown mb-3 mb-md-0 d-block d-md-inline">
3-
<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-
@lang('Bulk Actions')
5-
</button>
2+
<div class="mb-3 mb-md-0">
3+
<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">
5+
@lang('Bulk Actions')
6+
</button>
67

7-
<div class="dropdown-menu dropdown-menu-right w-100" aria-labelledby="bulkActions">
8-
@foreach($bulkActions as $action => $title)
9-
<a
10-
href="#"
11-
wire:click.prevent="{{ $action }}"
12-
wire:key="bulk-action-{{ $action }}"
13-
class="dropdown-item"
14-
>
15-
{{ $title }}
16-
</a>
17-
@endforeach
8+
<div class="dropdown-menu dropdown-menu-right w-100" aria-labelledby="bulkActions">
9+
@foreach($bulkActions as $action => $title)
10+
<a
11+
href="#"
12+
wire:click.prevent="{{ $action }}"
13+
wire:key="bulk-action-{{ $action }}"
14+
class="dropdown-item"
15+
>
16+
{{ $title }}
17+
</a>
18+
@endforeach
19+
</div>
1820
</div>
1921
</div>
2022
@endif
Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
11
@if ($columnSelect)
2-
<div
3-
x-cloak
4-
x-data="{ open: false }"
5-
x-on:keydown.escape.stop="open = false"
6-
x-on:mousedown.away="open = false"
7-
class="dropdown mb-3 mb-md-0 pl-0 pl-md-2 d-block d-md-inline"
8-
>
9-
<button
10-
x-on:click="open = !open"
11-
class="btn dropdown-toggle d-block w-100 d-md-inline"
12-
type="button"
13-
id="columnSelect"
14-
aria-haspopup="true"
15-
aria-expanded="false"
16-
>
17-
@lang('Columns')
18-
</button>
19-
2+
<div class="mb-3 mb-md-0 pl-0 pl-md-2">
203
<div
21-
class="dropdown-menu dropdown-menu-right w-100"
22-
:class="{'show' : open}"
23-
aria-labelledby="columnSelect"
4+
x-data="{ open: false }"
5+
x-on:keydown.escape.stop="open = false"
6+
x-on:mousedown.away="open = false"
7+
class="dropdown d-block d-md-inline"
248
>
25-
@foreach($columns as $column)
26-
@if ($column->isVisible() && $column->isSelectable())
27-
<div wire:key="columnSelect-{{ $loop->index }}">
28-
<label class="px-2 {{ $loop->last ? 'mb-0' : 'mb-1' }}">
29-
<input
30-
wire:model="columnSelectEnabled"
31-
wire:target="columnSelectEnabled"
32-
wire:loading.attr="disabled"
33-
type="checkbox"
34-
value="{{ $column->column() }}"
35-
/>
36-
<span class="ml-2">{{ $column->text() }}</span>
37-
</label>
38-
</div>
39-
@endif
40-
@endforeach
9+
<button
10+
x-on:click="open = !open"
11+
class="btn dropdown-toggle d-block w-100 d-md-inline"
12+
type="button"
13+
id="columnSelect"
14+
aria-haspopup="true"
15+
x-bind:aria-expanded="open"
16+
>
17+
@lang('Columns')
18+
</button>
19+
20+
<div
21+
class="dropdown-menu dropdown-menu-right w-100 mt-0 mt-md-3"
22+
:class="{'show' : open}"
23+
aria-labelledby="columnSelect"
24+
>
25+
@foreach($columns as $column)
26+
@if ($column->isVisible() && $column->isSelectable())
27+
<div wire:key="columnSelect-{{ $loop->index }}">
28+
<label class="px-2 {{ $loop->last ? 'mb-0' : 'mb-1' }}">
29+
<input
30+
wire:model="columnSelectEnabled"
31+
wire:target="columnSelectEnabled"
32+
wire:loading.attr="disabled"
33+
type="checkbox"
34+
value="{{ $column->column() }}"
35+
/>
36+
<span class="ml-2">{{ $column->text() }}</span>
37+
</label>
38+
</div>
39+
@endif
40+
@endforeach
41+
</div>
4142
</div>
4243
</div>
4344
@endif

0 commit comments

Comments
 (0)