@php use Filament\Support\Enums\Alignment; use Filament\Support\Enums\VerticalAlignment; use Filament\Support\Enums\Width; use Filament\Support\Facades\FilamentView; use Filament\Tables\Actions\HeaderActionsPosition; use Filament\Tables\Columns\Column; use Filament\Tables\Columns\ColumnGroup; use Filament\Tables\Enums\FiltersLayout; use Filament\Tables\Enums\RecordActionsPosition; use Filament\Tables\Enums\RecordCheckboxPosition; use Illuminate\Support\Str; use Illuminate\View\ComponentAttributeBag; $defaultRecordActions = $getRecordActions(); $flatRecordActionsCount = count($getFlatRecordActions()); $recordActionsAlignment = $getRecordActionsAlignment(); $recordActionsPosition = $getRecordActionsPosition(); $recordActionsColumnLabel = $getRecordActionsColumnLabel(); if (! $recordActionsAlignment instanceof Alignment) { $recordActionsAlignment = filled($recordActionsAlignment) ? (Alignment::tryFrom($recordActionsAlignment) ?? $recordActionsAlignment) : null; } $activeFiltersCount = $getActiveFiltersCount(); $isSelectionDisabled = $isSelectionDisabled(); $canSelectMultipleRecords = $canSelectMultipleRecords(); $columns = $getVisibleColumns(); $collapsibleColumnsLayout = $getCollapsibleColumnsLayout(); $columnsLayout = $getColumnsLayout(); $content = $getContent(); $contentGrid = $getContentGrid(); $contentFooter = $getContentFooter(); $filterIndicators = $getFilterIndicators(); $filtersApplyAction = $getFiltersApplyAction(); $filtersForm = $getFiltersForm(); $filtersFormWidth = $getFiltersFormWidth(); $hasColumnGroups = $hasColumnGroups(); $hasColumnsLayout = $hasColumnsLayout(); $hasSummary = $hasSummary($this->getAllTableSummaryQuery()); $header = $getHeader(); $headerActions = array_filter( $getHeaderActions(), fn (\Filament\Actions\Action | \Filament\Actions\ActionGroup $action): bool => $action->isVisible(), ); $headerActionsPosition = $getHeaderActionsPosition(); $heading = $getHeading(); $group = $getGrouping(); $toolbarActions = array_filter( $getToolbarActions(), fn (\Filament\Actions\Action | \Filament\Actions\ActionGroup $action): bool => $action->isVisible(), ); $groups = $getGroups(); $description = $getDescription(); $isGroupsOnly = $isGroupsOnly() && $group; $isReorderable = $isReorderable(); $isReordering = $isReordering(); $areGroupingSettingsVisible = (! $isReordering) && count($groups) && (! $areGroupingSettingsHidden()); $isGroupingDirectionSettingHidden = $isGroupingDirectionSettingHidden(); $areGroupingSettingsInDropdownOnDesktop = $areGroupingSettingsInDropdownOnDesktop(); $isColumnSearchVisible = $isSearchableByColumn(); $isGlobalSearchVisible = $isSearchable(); $isSearchOnBlur = $isSearchOnBlur(); $isSelectionEnabled = $isSelectionEnabled() && (! $isGroupsOnly); $selectsCurrentPageOnly = $selectsCurrentPageOnly(); $recordCheckboxPosition = $getRecordCheckboxPosition(); $isStriped = $isStriped(); $isLoaded = $isLoaded(); $hasFilters = $isFilterable(); $filtersLayout = $getFiltersLayout(); $filtersTriggerAction = $getFiltersTriggerAction(); $hasFiltersDialog = $hasFilters && in_array($filtersLayout, [FiltersLayout::Dropdown, FiltersLayout::Modal]); $hasFiltersAboveContent = $hasFilters && in_array($filtersLayout, [FiltersLayout::AboveContent, FiltersLayout::AboveContentCollapsible]); $hasFiltersAboveContentCollapsible = $hasFilters && ($filtersLayout === FiltersLayout::AboveContentCollapsible); $hasFiltersBelowContent = $hasFilters && ($filtersLayout === FiltersLayout::BelowContent); $hasColumnManagerDropdown = $hasColumnManager(); $hasReorderableColumns = $hasReorderableColumns(); $hasToggleableColumns = $hasToggleableColumns(); $columnManagerApplyAction = $getColumnManagerApplyAction(); $columnManagerTriggerAction = $getColumnManagerTriggerAction(); $hasHeader = $header || $heading || $description || ($headerActions && (! $isReordering)) || $isReorderable || $areGroupingSettingsVisible || $isGlobalSearchVisible || $hasFilters || count($filterIndicators) || $hasColumnManagerDropdown; $hasHeaderToolbar = $isReorderable || $areGroupingSettingsVisible || $isGlobalSearchVisible || $hasFiltersDialog || $hasColumnManagerDropdown; $headingTag = $getHeadingTag(); $secondLevelHeadingTag = $heading ? $getHeadingTag(1) : $headingTag; $pluralModelLabel = $getPluralModelLabel(); $records = $isLoaded ? $getRecords() : null; $searchDebounce = $getSearchDebounce(); $allSelectableRecordsCount = ($isSelectionEnabled && $isLoaded) ? $getAllSelectableRecordsCount() : null; $columnsCount = count($columns); $reorderRecordsTriggerAction = $getReorderRecordsTriggerAction($isReordering); $page = $this->getTablePage(); $defaultSortOptionLabel = $getDefaultSortOptionLabel(); $sortDirection = $getSortDirection(); if (count($defaultRecordActions) && (! $isReordering)) { $columnsCount++; } if ($isSelectionEnabled || $isReordering) { $columnsCount++; } if ($group) { $groupedSummarySelectedState = $this->getTableSummarySelectedState($this->getAllTableSummaryQuery(), modifyQueryUsing: fn (\Illuminate\Database\Query\Builder $query) => $group->groupQuery($query, model: $getQuery()->getModel())); } @endphp
$records === null, ]) >
$hasHeader, ]) >
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::HEADER_BEFORE, scopes: static::class) }} @if ($header) {{ $header }} @elseif (($heading || $description || $headerActions) && ! $isReordering)
$headerActions && ($headerActionsPosition === HeaderActionsPosition::Adaptive), ]) > @if ($heading || $description)
@if ($heading) <{{ $headingTag }} class="fi-ta-header-heading" > {{ $heading }} @endif @if ($description)

{{ $description }}

@endif
@endif @if ((! $isReordering) && $headerActions)
@foreach ($headerActions as $action) {{ $action }} @endforeach
@endif
@endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::HEADER_AFTER, scopes: static::class) }} @if ($hasFiltersAboveContent)
@if ($hasFiltersAboveContentCollapsible) {{ $filtersTriggerAction->badge($activeFiltersCount) }} @endif
@endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_BEFORE, scopes: static::class) }}
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_START, scopes: static::class) }}
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_REORDER_TRIGGER_BEFORE, scopes: static::class) }} @if ($isReorderable) {{ $reorderRecordsTriggerAction }} @endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_REORDER_TRIGGER_AFTER, scopes: static::class) }} @if ((! $isReordering) && count($toolbarActions)) @foreach ($toolbarActions as $action) {{ $action }} @endforeach @endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_GROUPING_SELECTOR_BEFORE, scopes: static::class) }} @if ($areGroupingSettingsVisible)
! $areGroupingSettingsInDropdownOnDesktop, ]) > {{ $getGroupRecordsTriggerAction() }}
@if (! $isGroupingDirectionSettingHidden) @endif
@if (! $areGroupingSettingsInDropdownOnDesktop)
@if (! $isGroupingDirectionSettingHidden) @endif
@endif
@endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_GROUPING_SELECTOR_AFTER, scopes: static::class) }}
@if ($isGlobalSearchVisible || $hasFiltersDialog || $hasColumnManagerDropdown)
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_SEARCH_BEFORE, scopes: static::class) }} @if ($isGlobalSearchVisible) @php $searchPlaceholder = $getSearchPlaceholder(); @endphp @endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_SEARCH_AFTER, scopes: static::class) }} @if ($hasFiltersDialog || $hasColumnManagerDropdown) @if ($hasFiltersDialog) @if (($filtersLayout === FiltersLayout::Modal) || $filtersTriggerAction->isModalSlideOver()) @php $filtersTriggerActionModalAlignment = $filtersTriggerAction->getModalAlignment(); $filtersTriggerActionIsModalAutofocused = $filtersTriggerAction->isModalAutofocused(); $filtersTriggerActionHasModalCloseButton = $filtersTriggerAction->hasModalCloseButton(); $filtersTriggerActionIsModalClosedByClickingAway = $filtersTriggerAction->isModalClosedByClickingAway(); $filtersTriggerActionIsModalClosedByEscaping = $filtersTriggerAction->isModalClosedByEscaping(); $filtersTriggerActionModalDescription = $filtersTriggerAction->getModalDescription(); $filtersTriggerActionVisibleModalFooterActions = $filtersTriggerAction->getVisibleModalFooterActions(); $filtersTriggerActionModalFooterActionsAlignment = $filtersTriggerAction->getModalFooterActionsAlignment(); $filtersTriggerActionModalHeading = $filtersTriggerAction->getCustomModalHeading() ?? __('filament-tables::table.filters.heading'); $filtersTriggerActionModalIcon = $filtersTriggerAction->getModalIcon(); $filtersTriggerActionModalIconColor = $filtersTriggerAction->getModalIconColor(); $filtersTriggerActionIsModalSlideOver = $filtersTriggerAction->isModalSlideOver(); $filtersTriggerActionIsModalFooterSticky = $filtersTriggerAction->isModalFooterSticky(); $filtersTriggerActionIsModalHeaderSticky = $filtersTriggerAction->isModalHeaderSticky(); @endphp {{ $filtersTriggerAction->badge($activeFiltersCount) }} {{ $filtersTriggerAction->getModalContent() }} {{ $filtersForm }} {{ $filtersTriggerAction->getModalContentFooter() }} @else @php $filtersFormMaxHeight = $getFiltersFormMaxHeight(); @endphp {{ $filtersTriggerAction->badge($activeFiltersCount) }} @endif @endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_COLUMN_MANAGER_TRIGGER_BEFORE, scopes: static::class) }} @if ($hasColumnManagerDropdown) @php $columnManagerMaxHeight = $getColumnManagerMaxHeight(); $columnManagerWidth = $getColumnManagerWidth(); $columnManagerColumns = $getColumnManagerColumns(); @endphp {{ $columnManagerTriggerAction }} @endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_COLUMN_MANAGER_TRIGGER_AFTER, scopes: static::class) }} @endif
@endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_END) }}
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::TOOLBAR_AFTER) }}
@if ($isReordering)
{{ \Filament\Support\generate_loading_indicator_html(new \Illuminate\View\ComponentAttributeBag([ 'wire:loading.delay.' . config('filament.livewire_loading_delay', 'default') => '', 'wire:target' => 'reorderTable', ])) }} {{ __('filament-tables::table.reorder_indicator') }}
@elseif ($isSelectionEnabled && $canSelectMultipleRecords && $isLoaded)
{{ \Filament\Support\generate_loading_indicator_html(new \Illuminate\View\ComponentAttributeBag([ 'x-show' => 'isLoading', ])) }}
@if (! $isSelectionDisabled)
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::SELECTION_INDICATOR_ACTIONS_BEFORE, scopes: static::class) }}
{{ trans_choice('filament-tables::table.selection_indicator.actions.select_all.label', $allSelectableRecordsCount, ['count' => \Illuminate\Support\Number::format($allSelectableRecordsCount, locale: app()->getLocale())]) }} {{ __('filament-tables::table.selection_indicator.actions.deselect_all.label') }}
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::SELECTION_INDICATOR_ACTIONS_AFTER, scopes: static::class) }}
@endif
@endif @if ($filterIndicators)
{{ __('filament-tables::table.filters.indicator') }}
@foreach ($filterIndicators as $indicator) @php $indicatorColor = $indicator->getColor(); @endphp {{ $indicator->getLabel() }} @if ($indicator->isRemovable()) @php $indicatorRemoveLivewireClickHandler = $indicator->getRemoveLivewireClickHandler(); @endphp @endif @endforeach
@if (collect($filterIndicators)->contains(fn (\Filament\Tables\Filters\Indicator $indicator): bool => $indicator->isRemovable())) @endif
@endif @if (((! $content) && (! $hasColumnsLayout)) || ($records === null) || count($records))
@if (($content || $hasColumnsLayout) && ($records !== null) && count($records)) @if (! $isReordering) @php $sortableColumns = array_filter( $columns, fn (\Filament\Tables\Columns\Column $column): bool => $column->isSortable(), ); @endphp @if ($isSelectionEnabled || count($sortableColumns))
@if ($isSelectionEnabled && $canSelectMultipleRecords && (! $isReordering)) @endif @if (count($sortableColumns))
@endif
@endif @endif @if ($content) {{ $content->with(['records' => $records]) }} @else
when($contentGrid, fn (ComponentAttributeBag $attributes) => $attributes->grid($contentGrid)) ->class([ 'fi-ta-content', 'fi-ta-content-grid' => $contentGrid, 'fi-ta-content-grouped' => $this->getTableGrouping(), ]) }} > @php $previousRecord = null; $previousRecordGroupKey = null; $previousRecordGroupTitle = null; @endphp @foreach ($records as $record) @php $recordAction = $getRecordAction($record); $recordKey = $getRecordKey($record); $recordUrl = $getRecordUrl($record); $openRecordUrlInNewTab = $shouldOpenRecordUrlInNewTab($record); $recordGroupKey = $group?->getStringKey($record); $recordGroupTitle = $group?->getTitle($record); $isRecordGroupCollapsible = $group?->isCollapsible(); $collapsibleColumnsLayout?->record($record)->recordKey($recordKey); $hasCollapsibleColumnsLayout = (bool) $collapsibleColumnsLayout?->isVisible(); $recordActions = array_reduce( $defaultRecordActions, function (array $carry, $action) use ($record): array { $action = $action->getClone(); if (! $action instanceof \Filament\Actions\BulkAction) { $action->record($record); } if ($action->isHidden()) { return $carry; } $carry[] = $action; return $carry; }, initial: [], ); @endphp @if ($recordGroupTitle !== $previousRecordGroupTitle) @if ($hasSummary && (! $isReordering) && filled($previousRecordGroupTitle)) $isReordering, ]) > @php $groupScopedAllTableSummaryQuery = $group->scopeQuery($this->getAllTableSummaryQuery(), $previousRecord); @endphp
@endif
isCollapsible()) x-on:click="toggleCollapseGroup(@js($recordGroupTitle))" @if (! $hasSummary) x-bind:class="{ 'fi-collapsed': isGroupCollapsed(@js($recordGroupTitle)) }" @endif @endif @class([ 'fi-ta-group-header', 'fi-collapsible' => $isRecordGroupCollapsible, ]) > @if ($isSelectionEnabled && $canSelectMultipleRecords) @endif
<{{ $secondLevelHeadingTag }} class="fi-ta-group-heading" > @if (filled($recordGroupLabel = ($group->isTitlePrefixedWithLabel() ? $group->getLabel() : null))) {{ $recordGroupLabel }}: @endif {{ $recordGroupTitle }} @if (filled($recordGroupDescription = $group->getDescription($record, $recordGroupTitle)))

{{ $recordGroupDescription }}

@endif
@if ($isRecordGroupCollapsible) @endif
@endif
$recordUrl || $recordAction, 'fi-ta-record-with-content-prefix' => $isReordering || ($isSelectionEnabled && $isRecordSelectable($record)), 'fi-ta-record-with-content-suffix' => $hasCollapsibleColumnsLayout && (! $isReordering), ...$getRecordClasses($record), ]) x-bind:class="{ {{ $group?->isCollapsible() ? '\'fi-collapsed\': isGroupCollapsed(' . \Illuminate\Support\Js::from($recordGroupTitle) . '),' : '' }} 'fi-selected': isRecordSelected(@js($recordKey)), }" > @php $hasItemBeforeRecordContent = $isReordering || ($isSelectionEnabled && $isRecordSelectable($record)); $hasItemAfterRecordContent = $hasCollapsibleColumnsLayout && (! $isReordering); @endphp @if ($isReordering) @elseif ($isSelectionEnabled && $isRecordSelectable($record)) @endif
@if ($recordUrl) @foreach ($columnsLayout as $columnsLayoutComponent) {{ $columnsLayoutComponent ->record($record) ->recordKey($recordKey) ->rowLoop($loop) ->renderInLayout() }} @endforeach @elseif ($recordAction) @php $recordWireClickAction = $getRecordAction($record) ? "mountTableAction('{$recordAction}', '{$recordKey}')" : $recordWireClickAction = "{$recordAction}('{$recordKey}')"; @endphp @else
@foreach ($columnsLayout as $columnsLayoutComponent) {{ $columnsLayoutComponent ->record($record) ->recordKey($recordKey) ->rowLoop($loop) ->renderInLayout() }} @endforeach
@endif @if ($hasCollapsibleColumnsLayout && (! $isReordering))
{{ $collapsibleColumnsLayout }}
@endif
@if ($recordActions && (! $isReordering))
'fi-align-start', Alignment::Center => 'fi-align-center', Alignment::End => 'fi-align-end', } => $contentGrid, 'fi-align-start md:fi-align-end' => ! $contentGrid, 'fi-ta-actions-before-columns-position' => $recordActionsPosition === RecordActionsPosition::BeforeColumns, ]) > @foreach ($recordActions as $action) {{ $action }} @endforeach
@endif
@if ($hasCollapsibleColumnsLayout && (! $isReordering)) @endif
@php $previousRecordGroupKey = $recordGroupKey; $previousRecordGroupTitle = $recordGroupTitle; $previousRecord = $record; @endphp @endforeach @if ($hasSummary && (! $isReordering) && filled($previousRecordGroupTitle) && ((! $records instanceof \Illuminate\Contracts\Pagination\Paginator) || (! $records->hasMorePages()))) @php $groupScopedAllTableSummaryQuery = $group->scopeQuery($this->getAllTableSummaryQuery(), $previousRecord); @endphp
@endif
@endif @if (($content || $hasColumnsLayout) && $contentFooter) {{ $contentFooter->with([ 'columns' => $columns, 'records' => $records, ]) }} @endif @if ($hasSummary && (! $isReordering))
@endif @elseif ((! ($content || $hasColumnsLayout)) && ($records !== null)) @if ($hasColumnGroups) @if (count($records)) @if ($isReordering) @else @if (count($defaultRecordActions) && in_array($recordActionsPosition, [RecordActionsPosition::BeforeCells, RecordActionsPosition::BeforeColumns])) @endif @if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::BeforeCells) @endif @endif @endif @foreach ($columnsLayout as $columnGroup) @if ($columnGroup instanceof Column) @if ($columnGroup->isVisible() && (! $columnGroup->isToggledHidden())) @endif @elseif ($columnGroup instanceof ColumnGroup) @php $columnGroupColumnsCount = count($columnGroup->getVisibleColumns()); @endphp @if ($columnGroupColumnsCount) @endif @endif @endforeach @if ((! $isReordering) && count($records)) @if (count($defaultRecordActions) && in_array($recordActionsPosition, [RecordActionsPosition::AfterColumns, RecordActionsPosition::AfterCells])) @endif @if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::AfterCells) @endif @endif @endif @if (count($records)) @if ($isReordering) @else @if (count($defaultRecordActions) && $recordActionsPosition === RecordActionsPosition::BeforeCells) @if ($recordActionsColumnLabel) @else @endif @endif @if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::BeforeCells) @endif @if (count($defaultRecordActions) && $recordActionsPosition === RecordActionsPosition::BeforeColumns) @if ($recordActionsColumnLabel) @else @endif @endif @endif @endif @foreach ($columns as $column) @php $columnName = $column->getName(); $columnLabel = $column->getLabel(); $columnAlignment = $column->getAlignment(); $columnWidth = $column->getWidth(); $isColumnActivelySorted = $getSortColumn() === $column->getName(); $isColumnSortable = $column->isSortable() && (! $isReordering); @endphp @endforeach @if ((! $isReordering) && count($records)) @if (count($defaultRecordActions) && $recordActionsPosition === RecordActionsPosition::AfterColumns) @if ($recordActionsColumnLabel) @else @endif @endif @if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::AfterCells) @endif @if (count($defaultRecordActions) && $recordActionsPosition === RecordActionsPosition::AfterCells) @if ($recordActionsColumnLabel) @else @endif @endif @endif @if ($isColumnSearchVisible || count($records)) @if ($isColumnSearchVisible) @if (count($records)) @if ($isReordering) @else @if (count($defaultRecordActions) && in_array($recordActionsPosition, [RecordActionsPosition::BeforeCells, RecordActionsPosition::BeforeColumns])) @endif @if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::BeforeCells) @endif @endif @endif @foreach ($columns as $column) @php $columnName = $column->getName(); @endphp @endforeach @if ((! $isReordering) && count($records)) @if (count($defaultRecordActions) && in_array($recordActionsPosition, [RecordActionsPosition::AfterColumns, RecordActionsPosition::AfterCells])) @endif @if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::AfterCells) @endif @endif @endif @if (count($records)) @php $isRecordRowStriped = false; $previousRecord = null; $previousRecordGroupKey = null; $previousRecordGroupTitle = null; @endphp @foreach ($records as $record) @php $recordAction = $getRecordAction($record); $recordKey = $getRecordKey($record); $recordUrl = $getRecordUrl($record); $openRecordUrlInNewTab = $shouldOpenRecordUrlInNewTab($record); $recordGroupKey = $group?->getStringKey($record); $recordGroupTitle = $group?->getTitle($record); $recordActions = array_reduce( $defaultRecordActions, function (array $carry, $action) use ($record): array { $action = $action->getClone(); if (! $action instanceof \Filament\Actions\BulkAction) { $action->record($record); } if ($action->isHidden()) { return $carry; } $carry[] = $action; return $carry; }, initial: [], ); @endphp @if ($recordGroupTitle !== $previousRecordGroupTitle) @if ($hasSummary && (! $isReordering) && filled($previousRecordGroupTitle)) @php $groupColumn = $group->getColumn(); $groupScopedAllTableSummaryQuery = $group->scopeQuery($this->getAllTableSummaryQuery(), $previousRecord); @endphp @endif @if (! $isGroupsOnly) @php $isRecordGroupCollapsible = $group?->isCollapsible(); $groupHeaderColspan = $columnsCount; if ($isSelectionEnabled) { $groupHeaderColspan--; if ( ($recordCheckboxPosition === RecordCheckboxPosition::BeforeCells) && count($defaultRecordActions) && ($recordActionsPosition === RecordActionsPosition::BeforeCells) ) { $groupHeaderColspan--; } } @endphp @if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::BeforeCells) @if (count($defaultRecordActions) && $recordActionsPosition === RecordActionsPosition::BeforeCells) @endif @endif @if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::AfterCells) @endif @endif @php $isRecordRowStriped = false; @endphp @endif @if (! $isGroupsOnly) $recordAction || $recordUrl, 'fi-striped' => $isStriped && $isRecordRowStriped, ...$getRecordClasses($record), ]) > @if ($isReordering) @endif @if (count($defaultRecordActions) && $recordActionsPosition === RecordActionsPosition::BeforeCells && (! $isReordering)) @endif @if ($isSelectionEnabled && ($recordCheckboxPosition === RecordCheckboxPosition::BeforeCells) && (! $isReordering)) @endif @if (count($defaultRecordActions) && $recordActionsPosition === RecordActionsPosition::BeforeColumns && (! $isReordering)) @endif @foreach ($columns as $column) @php $column->record($record); $column->rowLoop($loop->parent); $column->recordKey($recordKey); $columnAction = $column->getAction(); $columnUrl = $column->getUrl(); $columnHasStateBasedUrls = $column->hasStateBasedUrls(); $isColumnClickDisabled = $column->isClickDisabled() || $isReordering; $columnWrapperTag = match (true) { ($columnUrl || ($recordUrl && $columnAction === null)) && (! $columnHasStateBasedUrls) && (! $isColumnClickDisabled) => 'a', ($columnAction || $recordAction) && (! $columnHasStateBasedUrls) && (! $isColumnClickDisabled) => 'button', default => 'div', }; if ($columnWrapperTag === 'button') { if ($columnAction instanceof \Filament\Actions\Action) { $columnWireClickAction = "mountTableAction('{$columnAction->getName()}', '{$recordKey}')"; } elseif ($columnAction) { $columnWireClickAction = "callTableColumnAction('{$column->getName()}', '{$recordKey}')"; } else { if ($this->getTable()->getAction($recordAction)) { $columnWireClickAction = "mountTableAction('{$recordAction}', '{$recordKey}')"; } else { $columnWireClickAction = "{$recordAction}('{$recordKey}')"; } } } @endphp @endforeach @if (count($defaultRecordActions) && $recordActionsPosition === RecordActionsPosition::AfterColumns && (! $isReordering)) @endif @if ($isSelectionEnabled && $recordCheckboxPosition === RecordCheckboxPosition::AfterCells && (! $isReordering)) @endif @if (count($defaultRecordActions) && $recordActionsPosition === RecordActionsPosition::AfterCells && (! $isReordering)) @endif @endif @php $isRecordRowStriped = ! $isRecordRowStriped; $previousRecord = $record; $previousRecordGroupKey = $recordGroupKey; $previousRecordGroupTitle = $recordGroupTitle; @endphp @endforeach @if ($hasSummary && (! $isReordering) && filled($previousRecordGroupTitle) && ((! $records instanceof \Illuminate\Contracts\Pagination\Paginator) || (! $records->hasMorePages()))) @php $groupColumn = $group->getColumn(); $groupScopedAllTableSummaryQuery = $group->scopeQuery($this->getAllTableSummaryQuery(), $previousRecord); @endphp @endif @if ($hasSummary && (! $isReordering)) @php $groupColumn = $group?->getColumn(); @endphp @endif @endif @endif @if (($records !== null) && count($records) && $contentFooter) {{ $contentFooter->with([ 'columns' => $columns, 'records' => $records, ]) }} @endif
getExtraHeaderAttributeBag()->class([ 'fi-ta-header-group-cell', 'fi-wrapped' => $columnGroup->isHeaderWrapped(), ((($columnGroupAlignment = $columnGroup->getAlignment()) instanceof \Filament\Support\Enums\Alignment) ? "fi-align-{$columnGroupAlignment->value}" : (is_string($columnGroupAlignment) ? $columnGroupAlignment : '')), (filled($columnGroupHiddenFrom = $columnGroup->getHiddenFrom()) ? "{$columnGroupHiddenFrom}:fi-hidden" : ''), (filled($columnGroupVisibleFrom = $columnGroup->getVisibleFrom()) ? "{$columnGroupVisibleFrom}:fi-visible" : ''), ]) }} > {{ $columnGroup->getLabel() }}
{{ $recordActionsColumnLabel }} @if ($canSelectMultipleRecords) @endif {{ $recordActionsColumnLabel }} getExtraHeaderAttributeBag() ->class([ 'fi-ta-header-cell', 'fi-ta-header-cell-' . str($columnName)->camel()->kebab(), 'fi-growable' => blank($columnWidth) && $column->canGrow(default: false), 'fi-grouped' => $column->getGroup(), 'fi-wrapped' => $column->isHeaderWrapped(), 'fi-ta-header-cell-sorted' => $isColumnActivelySorted, ((($columnAlignment = $column->getAlignment()) instanceof \Filament\Support\Enums\Alignment) ? "fi-align-{$columnAlignment->value}" : (is_string($columnAlignment) ? $columnAlignment : '')), (filled($columnHiddenFrom = $column->getHiddenFrom()) ? "{$columnHiddenFrom}:fi-hidden" : ''), (filled($columnVisibleFrom = $column->getVisibleFrom()) ? "{$columnVisibleFrom}:fi-visible" : ''), ]) ->style([ ('width: ' . $columnWidth) => filled($columnWidth), ]) }} > @if ($isColumnSortable) {{ $columnLabel }} {{ \Filament\Support\generate_icon_html(($isColumnActivelySorted && $sortDirection === 'asc') ? \Filament\Support\Icons\Heroicon::ChevronUp : \Filament\Support\Icons\Heroicon::ChevronDown, alias: match (true) { $isColumnActivelySorted && ($sortDirection === 'asc') => 'tables::header-cell.sort-asc-button', $isColumnActivelySorted && ($sortDirection === 'desc') => 'tables::header-cell.sort-desc-button', default => 'tables::header-cell.sort-button', }) }} @else {{ $columnLabel }} @endif {{ $recordActionsColumnLabel }} @if ($canSelectMultipleRecords) @endif {{ $recordActionsColumnLabel }}
$isIndividuallySearchable = $column->isIndividuallySearchable(), 'fi-ta-individual-search-cell-' . str($columnName)->camel()->kebab() => $isIndividuallySearchable, ]) > @if ($isIndividuallySearchable) @endif
@if ($canSelectMultipleRecords) @endif
$isRecordGroupCollapsible, ]) >
<{{ $secondLevelHeadingTag }} class="fi-ta-group-heading" > @if (filled($recordGroupLabel = ($group->isTitlePrefixedWithLabel() ? $group->getLabel() : null))) {{ $recordGroupLabel }}: @endif {{ $recordGroupTitle }} @if (filled($recordGroupDescription = $group->getDescription($record, $recordGroupTitle)))

{{ $recordGroupDescription }}

@endif
@if ($isRecordGroupCollapsible) @endif
@if ($canSelectMultipleRecords) @endif
'fi-align-center', Alignment::Start, Alignment::Left => 'fi-align-start', Alignment::Between, Alignment::Justify => 'fi-align-between', Alignment::End, Alignment::Right => '', default => is_string($recordActionsAlignment) ? $recordActionsAlignment : '', }, ]) > @foreach ($recordActions as $action) {{ $action }} @endforeach
@if ($isRecordSelectable($record)) @endif
'fi-align-center', Alignment::Start, Alignment::Left => 'fi-align-start', Alignment::Between, Alignment::Justify => 'fi-align-between', Alignment::End, Alignment::Right => '', default => is_string($recordActionsAlignment) ? $recordActionsAlignment : '', }, ]) > @foreach ($recordActions as $action) {{ $action }} @endforeach
getExtraCellAttributeBag()->class([ 'fi-ta-cell', 'fi-ta-cell-' . str($column->getName())->camel()->kebab(), ((($columnAlignment = $column->getAlignment()) instanceof \Filament\Support\Enums\Alignment) ? "fi-align-{$columnAlignment->value}" : (is_string($columnAlignment) ? $columnAlignment : '')), ((($columnVerticalAlignment = $column->getVerticalAlignment()) instanceof \Filament\Support\Enums\VerticalAlignment) ? "fi-vertical-align-{$columnVerticalAlignment->value}" : (is_string($columnVerticalAlignment) ? $columnVerticalAlignment : '')), (filled($columnHiddenFrom = $column->getHiddenFrom()) ? "{$columnHiddenFrom}:fi-hidden" : ''), (filled($columnVisibleFrom = $column->getVisibleFrom()) ? "{$columnVisibleFrom}:fi-visible" : ''), ]) }} > <{{ $columnWrapperTag }} @if ($columnWrapperTag === 'a') {{ \Filament\Support\generate_href_html($columnUrl ?: $recordUrl, $columnUrl ? $column->shouldOpenUrlInNewTab() : $openRecordUrlInNewTab) }} @elseif ($columnWrapperTag === 'button') type ="button" wire:click.prevent.stop="{{ $columnWireClickAction }}" wire:loading.attr="disabled" wire:target="{{ $columnWireClickAction }}" @endif @class([ 'fi-ta-col', 'fi-ta-col-has-column-url' => ($columnWrapperTag === 'a') && filled($columnUrl), ]) > {{ $column }}
'fi-align-center', Alignment::Start, Alignment::Left => 'fi-align-start', Alignment::Between, Alignment::Justify => 'fi-align-between', Alignment::End, Alignment::Right => '', default => is_string($recordActionsAlignment) ? $recordActionsAlignment : '', }, ]) > @foreach ($recordActions as $action) {{ $action }} @endforeach
@if ($isRecordSelectable($record)) @endif
'fi-align-center', Alignment::Start, Alignment::Left => 'fi-align-start', Alignment::Between, Alignment::Justify => 'fi-align-between', Alignment::End, Alignment::Right => '', default => is_string($recordActionsAlignment) ? $recordActionsAlignment : '', }, ]) > @foreach ($recordActions as $action) {{ $action }} @endforeach
@elseif ($records === null)
{{ \Filament\Support\generate_loading_indicator_html(size: \Filament\Support\Enums\IconSize::TwoExtraLarge) }}
@endif
@endif @if (($records !== null) && ! count($records)) @if ($emptyState = $getEmptyState()) {{ $emptyState }} @else
{{ \Filament\Support\generate_icon_html($getEmptyStateIcon(), size: \Filament\Support\Enums\IconSize::Large) }}
<{{ $secondLevelHeadingTag }} class="fi-ta-empty-state-heading" > {{ $getEmptyStateHeading() }} @if (filled($emptyStateDescription = $getEmptyStateDescription()))

{{ $emptyStateDescription }}

@endif @if ($emptyStateActions = array_filter( $getEmptyStateActions(), fn (\Filament\Actions\Action | \Filament\Actions\ActionGroup $action): bool => $action->isVisible(), ))
@foreach ($emptyStateActions as $action) {{ $action }} @endforeach
@endif
@endif @endif @if ((($records instanceof \Illuminate\Contracts\Pagination\Paginator) || ($records instanceof \Illuminate\Contracts\Pagination\CursorPaginator)) && ((! ($records instanceof \Illuminate\Contracts\Pagination\LengthAwarePaginator)) || $records->total())) @php $hasExtremePaginationLinks = $hasExtremePaginationLinks(); $paginationPageOptions = $getPaginationPageOptions(); @endphp @endif @if ($hasFiltersBelowContent) @endif