@props([ 'column', 'isClickDisabled' => false, 'record', 'recordAction' => null, 'recordKey' => null, 'recordUrl' => null, ]) @php $action = $column->getAction(); $alignment = $column->getAlignment(); $name = $column->getName(); $shouldOpenUrlInNewTab = $column->shouldOpenUrlInNewTab(); $tooltip = $column->getTooltip(); $url = $column->getUrl(); $alignmentClass = match ($alignment) { 'center' => 'text-center', 'end' => 'text-end', 'left' => 'text-left', 'right' => 'text-right', 'justify' => 'text-justify', default => 'text-start', }; $slot = $column->viewData(['recordKey' => $recordKey]); @endphp
class(['filament-tables-column-wrapper']) }} > @if (($url || ($recordUrl && $action === null)) && (! $isClickDisabled)) {{ $slot }} @elseif (($action || $recordAction) && (! $isClickDisabled)) @php if ($action instanceof \Filament\Tables\Actions\Action) { $wireClickAction = "mountTableAction('{$action->getName()}', '{$recordKey}')"; } elseif ($action) { $wireClickAction = "callTableColumnAction('{$name}', '{$recordKey}')"; } else { if ($this->getCachedTableAction($recordAction)) { $wireClickAction = "mountTableAction('{$recordAction}', '{$recordKey}')"; } else { $wireClickAction = "{$recordAction}('{$recordKey}')"; } } @endphp @else
{{ $slot }}
@endif