Skip to content

Commit 67ef255

Browse files
committed
Further Cleanup
1 parent 6cc39e0 commit 67ef255

File tree

7 files changed

+17
-6
lines changed

7 files changed

+17
-6
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
->except(['default','default-styling','default-colors'])
1111
}}
1212
>
13+
@includeWhen(!$this->showActionsInToolbar(), 'livewire-tables::includes.toolbar.items.actions', $this->getToolbarActionAttributes())
14+
1315
@if(method_exists($this, 'showSortPillsSection') ? $this->showSortPillsSection() : false)
1416
<x-livewire-tables::tools.sorting-pills />
1517
@endif

resources/views/components/wrapper.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<div {{ $attributes->merge($this->getComponentWrapperAttributes()) }}>
33
@includeWhen($this->debugIsEnabled(),'livewire-tables::includes.debug')
44
@includeWhen($this->offlineIndicatorIsEnabled(),'livewire-tables::includes.offline')
5+
56
{{ $slot }}
67
</div>

resources/views/datatable.blade.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
)
1010

1111
<x-livewire-tables::wrapper :$tableName :$primaryKey :$isTailwind :$isTailwind4 :$isBootstrap :$isBootstrap4 :$isBootstrap5 :$localisationPath :$collapsingColumnDetails :$collapsingColumnButtonExpandAttributes :$collapsingColumnButtonCollapseAttributes :$hasCollapsingColumns :$currentlyReorderingStatus :$hasDisplayLoadingPlaceholder :$coreTableAttributes :$selectedVisibleColumns :$showBulkActionsSections :$showCollapsingColumnSections :$hasTrAttributes :$collapsingColumnInfo :$filterGenericData :$hasTdAttributes >
12-
@if($this->hasActions() && !$this->showActionsInToolbar())
13-
<x-livewire-tables::actions />
14-
@endif
1512

1613
@if($this->shouldShowTools())
1714

src/Features/Actions/Core/Helpers/ActionsHelpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Support\Collection;
66
use Livewire\Attributes\Computed;
7-
use Rappasoft\LaravelLivewireTables\Views\Action;
7+
use Rappasoft\LaravelLivewireTables\Features\Actions\Views\Action;
88

99
trait ActionsHelpers
1010
{

src/Features/Actions/Core/WithActions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ trait WithActions
3232
/**
3333
* Undocumented variable
3434
*
35-
* @var Collection<int,\Rappasoft\LaravelLivewireTables\Views\Action>|null
35+
* @var Collection<int,\Rappasoft\LaravelLivewireTables\Features\Actions\Views>|null
3636
*/
3737
protected ?Collection $validActions;
3838

src/Features/Tools/Helpers/ToolBarHelpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function hasToolbarReorder(): bool
7272

7373
protected function hasToolbarConfigurableAreas(): bool
7474
{
75-
return $this->hasConfigurableAreaFor('toolbar-left-end') || $this->hasConfigurableAreaFor('toolbar-left-start') || $this->hasConfigurableAreaFor('toolbar-right-start') || $this->hasConfigurableAreaFor('toolbar-right-end');
75+
return $this->hasConfigurableAreaFor('toolbar-left-start') || $this->hasConfigurableAreaFor('toolbar-left-end') || $this->hasConfigurableAreaFor('toolbar-right-start') || $this->hasConfigurableAreaFor('toolbar-right-end');
7676
}
7777

7878
protected function hasToolbarActions(): bool

src/Features/Tools/Helpers/ToolBarItemHelpers.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ protected function getToolbarItemForFilters()
100100
}
101101
return [];
102102
}
103+
public function getToolbarActionAttributes()
104+
{
105+
return [
106+
'actionWrapperAttributes' => $this->getActionWrapperAttributes(),
107+
'actionButtonAttributes' => $this->getActionsButtonAttributes(),
108+
'actionsMenuAttributes' => $this->getActionsMenuAttributes(),
109+
'actionsPosition' => $this->getActionsPosition(),
110+
'showActionsAsDropdown' => $this->showActionsAsDropdown(),
111+
'showActionsInToolbar' => $this->showActionsInToolbar(),
112+
];
113+
}
103114

104115
protected function getToolbarItemForActions()
105116
{

0 commit comments

Comments
 (0)