From 40cda4737d99524c07f96990930af0fcf7d19146 Mon Sep 17 00:00:00 2001 From: racerguy Date: Mon, 23 Oct 2023 19:49:20 +0000 Subject: [PATCH] Add Bool for Action to Display Left Side Of Table --- resources/views/components/table.blade.php | 31 ++++++++++++++++++++++ src/PowerGridComponent.php | 8 ++++++ 2 files changed, 39 insertions(+) diff --git a/resources/views/components/table.blade.php b/resources/views/components/table.blade.php index 7835d94c..c023ff0d 100644 --- a/resources/views/components/table.blade.php +++ b/resources/views/components/table.blade.php @@ -32,6 +32,27 @@ class="{{ $theme->table->thClass }}" /> @endif + @if($displayActionsFirst) + + @if (isset($actions) && count($actions)) + @php + $responsiveActionsColumnName = PowerComponents\LivewirePowerGrid\Responsive::ACTIONS_COLUMN_NAME; + + $isActionFixedOnResponsive = isset($this->setUp['responsive']) && in_array($responsiveActionsColumnName, data_get($this->setUp, 'responsive.fixedColumns')) ? true : false; + @endphp + + + {{ trans('livewire-powergrid::datatable.labels.action') }} + + @endif + @endif + @foreach ($columns as $column) + @endif + @include('livewire-powergrid::components.row', ['rowIndex' => $loop->index + 1]) displayActionsFirst = true; + return $this; + } + private function resolveTotalRow(): void { collect($this->columns)->each(function (Column $column) {