@php use Filament\Support\Enums\Alignment; use Webkul\Support\Filament\Infolists\Components\Repeater\TableColumn; $items = $getItems(); $tableColumns = $getTableColumns(); $extraActions = $getExtraItemActions(); $hasExtraActions = ! empty($extraActions); $hasColumnManager = $hasColumnManager(); $attributes = $getExtraAttributeBag() ->class(['fi-fo-table-repeater', 'fi-compact']); $hasSummary = $hasAnySummarizers(); $hasResizableColumns = collect($tableColumns)->contains(fn (TableColumn $column) => $column->isResizable()); $resizableColumnConfig = collect($tableColumns)->mapWithKeys(function (TableColumn $column) { return [$column->getName() => [ 'isResizable' => $column->isResizable(), 'minWidth' => $column->getMinWidth(), 'maxWidth' => $column->getMaxWidth(), 'width' => $column->getWidth(), ]]; })->toArray(); @endphp @if (empty($items)) @php $tooltip = $getEmptyTooltip(); $attributes = $attributes->merge([ 'x-tooltip' => filled($tooltip) ? '{content: ' . Js::from($tooltip) . ', theme: $store.theme, allowHTML: ' . Js::from($tooltip instanceof \Illuminate\Contracts\Support\Htmlable) . '}' : null, ], escape: false); @endphp
{{ $placeholder }}
@endif| filled($columnWidth),
])
@endif
>
@if (! $column->isHeaderLabelHidden())
{{ $column->getLabel() }}
@else
{{ $column->getLabel() }}
@endif
@if ($isResizable && $hasResizableColumns)
@endif
|
@endforeach
@if ($hasColumnManager)
|
@endif
|---|---|
|
{!! $component->toHtml() !!}
|
@endforeach
@if ($hasExtraActions)
@foreach ($extraActions as $action)
@php $action = $action(['item' => $index]); @endphp
{!! $action->toHtml() !!}
@endforeach
|
@endif
| @if ($tableColumn->hasSummarizer()) {{ $getSummaryForColumn($tableColumn->getName()) }} @endif | @endforeach @if ($hasColumnManager)@endif |