config('tables.dark_mode'),
'overflow-x-auto' => $content || $hasColumnsLayout,
'rounded-t-xl' => ! $renderHeader,
'border-t' => $renderHeader,
])
x-bind:class="{
'rounded-t-xl': ! hasHeader,
'border-t': hasHeader,
}"
>
@if (($content || $hasColumnsLayout) && ($records !== null) && count($records))
@if (($content || $hasColumnsLayout) && (! $isReordering))
@php
$sortableColumns = array_filter(
$columns,
fn (\Filament\Tables\Columns\Column $column): bool => $column->isSortable(),
);
@endphp
config('tables.dark_mode'),
'hidden' => (! $isSelectionEnabled) && (! count($sortableColumns)),
])
>
@if ($isSelectionEnabled)
@endif
@if (count($sortableColumns))
@endif
@endif
@if ($content)
{{ $content->with(['records' => $records]) }}
@else
@foreach ($records as $record)
@php
$recordAction = $getRecordAction($record);
$recordKey = $getRecordKey($record);
$recordUrl = $getRecordUrl($record);
$collapsibleColumnsLayout?->record($record);
$hasCollapsibleColumnsLayout = $collapsibleColumnsLayout && (! $collapsibleColumnsLayout->isHidden());
@endphp
$recordUrl || $recordAction,
'dark:hover:bg-gray-500/10' => ($recordUrl || $recordAction) && config('tables.dark_mode'),
'dark:border-gray-600' => (! $contentGrid) && config('tables.dark_mode'),
'group' => $isReordering,
'rounded-xl border border-gray-200 shadow-sm' => $contentGrid,
'dark:border-gray-700 dark:bg-gray-700/40' => $contentGrid && config('tables.dark_mode'),
],
$getRecordClasses($record),
))
>
(! $contentGrid),
'mr-6 rtl:ml-6 rtl:mr-0' => $isSelectionEnabled || $hasCollapsibleColumnsLayout || $isReordering,
])
>
@if ($isSelectionEnabled)
@endif
@if ($hasCollapsibleColumnsLayout)
$isSelectionEnabled,
'top-1' => ! $isSelectionEnabled,
'md:relative md:right-0 md:top-0 rtl:md:left-0' => ! $contentGrid,
'hidden' => $isReordering,
])
>
@endif
@if ($recordUrl)
@elseif ($recordAction)
@php
if ($this->getCachedTableAction($recordAction)) {
$recordWireClickAction = "mountTableAction('{$recordAction}', '{$recordKey}')";
} else {
$recordWireClickAction = "{$recordAction}('{$recordKey}')";
}
@endphp
@else
@endif
@if (count($actions))
@endif
@if ($hasCollapsibleColumnsLayout)
(! $contentGrid) && $isSelectionEnabled,
'md:pl-12 rtl:md:pl-0 rtl:md:pr-12' => (! $contentGrid) && (! $isSelectionEnabled),
'hidden' => $isReordering,
])
>
{{ $collapsibleColumnsLayout->viewData(['recordKey' => $recordKey]) }}
@endif
@endforeach
@endif
@if (($content || $hasColumnsLayout) && $contentFooter)
{{ $contentFooter->with(['columns' => $columns, 'records' => $records]) }}
@endif
@elseif (($records !== null) && count($records))
@if ($isReordering)
|
@else
@if (count($actions) && $actionsPosition === ActionsPosition::BeforeCells)
@if ($actionsColumnLabel)
{{ $actionsColumnLabel }}
@else
|
@endif
@endif
@if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::BeforeCells)
@endif
@if (count($actions) && $actionsPosition === ActionsPosition::BeforeColumns)
@if ($actionsColumnLabel)
{{ $actionsColumnLabel }}
@else
|
@endif
@endif
@endif
@foreach ($columns as $column)
{{ $column->getLabel() }}
@endforeach
@if (! $isReordering)
@if (count($actions) && $actionsPosition === ActionsPosition::AfterColumns)
@if ($actionsColumnLabel)
{{ $actionsColumnLabel }}
@else
|
@endif
@endif
@if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::AfterCells)
@endif
@if (count($actions) && $actionsPosition === ActionsPosition::AfterCells)
@if ($actionsColumnLabel)
{{ $actionsColumnLabel }}
@else
|
@endif
@endif
@endif
@if ($isColumnSearchVisible)
@if ($isReordering)
|
@else
@if (count($actions) && in_array($actionsPosition, [ActionsPosition::BeforeCells, ActionsPosition::BeforeColumns]))
|
@endif
@if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::BeforeCells)
|
@endif
@endif
@foreach ($columns as $column)
@if ($column->isIndividuallySearchable())
@endif
@endforeach
@if (! $isReordering)
@if (count($actions) && in_array($actionsPosition, [ActionsPosition::AfterColumns, ActionsPosition::AfterCells]))
|
@endif
@if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::AfterCells)
|
@endif
@endif
@endif
@if (($records !== null) && count($records))
@foreach ($records as $record)
@php
$recordAction = $getRecordAction($record);
$recordKey = $getRecordKey($record);
$recordUrl = $getRecordUrl($record);
@endphp
@if ($isReordering)
@endif
@if (count($actions) && $actionsPosition === ActionsPosition::BeforeCells)
@endif
@if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::BeforeCells)
@if ($isRecordSelectable($record))
@else
@endif
@endif
@if (count($actions) && $actionsPosition === ActionsPosition::BeforeColumns)
@endif
@foreach ($columns as $column)
@php
$column->record($record);
$column->rowLoop($loop->parent);
@endphp
@endforeach
@if (count($actions) && $actionsPosition === ActionsPosition::AfterColumns)
@endif
@if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::AfterCells)
@if ($isRecordSelectable($record))
@else
@endif
@endif
@if (count($actions) && $actionsPosition === ActionsPosition::AfterCells)
@endif
@endforeach
@if ($contentFooter)
{{ $contentFooter->with(['columns' => $columns, 'records' => $records]) }}
@endif
@endif
@elseif ($records === null)
config('tables.dark_mode'),
])
>
@else
@if ($emptyState = $getEmptyState())
{{ $emptyState }}
@else
{{ $getEmptyStateHeading() }}
{{ $getEmptyStateDescription() }}
@endif
@endif
@if ($records instanceof \Illuminate\Contracts\Pagination\Paginator &&
((! $records instanceof \Illuminate\Contracts\Pagination\LengthAwarePaginator) || $records->total()))