Skip to content

Commit a3e6dcb

Browse files
authored
UI patch: reorder if statement in toolbar configurable area to fix UI inconsistencies (rappasoft#1690)
* patch: reorder if statements and class definition in toolbar configureable area
1 parent 30fcae0 commit a3e6dcb

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
66
### New Features
77
- Add setConfigurableArea by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1706
88

9+
### Bug Fixes
10+
- UI patch: toolbar fix for reordering by @itsLeonB in https://github.com/rappasoft/laravel-livewire-tables/pull/1690
11+
912
### Tweaks
1013
- Adjust Workflow behaviour for PCOV by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1706
1114
- Updated nl language in https://github.com/rappasoft/laravel-livewire-tables/pull/1695 by @Jerimu

resources/views/components/tools/toolbar.blade.php

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,19 @@
1515
'w-full mb-4 md:mb-0 md:w-2/4 md:flex space-y-4 md:space-y-0 md:space-x-2' => $component->isTailwind(),
1616
])
1717
>
18-
<div x-cloak x-show="!currentlyReorderingStatus">
19-
@if ($component->hasConfigurableAreaFor('toolbar-left-start'))
18+
@if ($component->hasConfigurableAreaFor('toolbar-left-start'))
19+
<div x-cloak x-show="!currentlyReorderingStatus" @class([
20+
'mb-3 mb-md-0 input-group' => $component->isBootstrap(),
21+
'flex rounded-md shadow-sm' => $component->isTailwind(),
22+
])>
2023
@include($component->getConfigurableAreaFor('toolbar-left-start'), $component->getParametersForConfigurableArea('toolbar-left-start'))
21-
@endif
22-
</div>
23-
24+
</div>
25+
@endif
26+
2427
@if ($component->reorderIsEnabled())
2528
<x-livewire-tables::tools.toolbar.items.reorder-buttons />
2629
@endif
27-
30+
2831
@if ($component->searchIsEnabled() && $component->searchVisibilityIsEnabled())
2932
<x-livewire-tables::tools.toolbar.items.search-field />
3033
@endif
@@ -34,13 +37,16 @@
3437
@endif
3538

3639
@if ($component->hasConfigurableAreaFor('toolbar-left-end'))
37-
<div x-cloak x-show="!currentlyReorderingStatus">
40+
<div x-cloak x-show="!currentlyReorderingStatus" @class([
41+
'mb-3 mb-md-0 input-group' => $component->isBootstrap(),
42+
'flex rounded-md shadow-sm' => $component->isTailwind(),
43+
])>
3844
@include($component->getConfigurableAreaFor('toolbar-left-end'), $component->getParametersForConfigurableArea('toolbar-left-end'))
3945
</div>
4046
@endif
4147
</div>
4248

43-
<div x-cloak x-show="!currentlyReorderingStatus"
49+
<div x-cloak x-show="!currentlyReorderingStatus"
4450
@class([
4551
'd-md-flex' => $component->isBootstrap(),
4652
'md:flex md:items-center space-y-4 md:space-y-0 md:space-x-2' => $component->isTailwind(),
@@ -53,13 +59,13 @@
5359
@if ($component->showBulkActionsDropdownAlpine())
5460
<x-livewire-tables::tools.toolbar.items.bulk-actions />
5561
@endif
56-
62+
5763
@if ($component->columnSelectIsEnabled())
58-
<x-livewire-tables::tools.toolbar.items.column-select />
64+
<x-livewire-tables::tools.toolbar.items.column-select />
5965
@endif
6066

6167
@if ($component->paginationIsEnabled() && $component->perPageVisibilityIsEnabled())
62-
<x-livewire-tables::tools.toolbar.items.pagination-dropdown />
68+
<x-livewire-tables::tools.toolbar.items.pagination-dropdown />
6369
@endif
6470

6571
@if ($component->hasConfigurableAreaFor('toolbar-right-end'))

0 commit comments

Comments
 (0)