Skip to content

Commit

Permalink
Merge pull request #21 from awcodes/fix/header-actions-width
Browse files Browse the repository at this point in the history
Fix: header actions width when empty
  • Loading branch information
awcodes authored Feb 7, 2023
2 parents 3cfcbcb + 026aa16 commit 48954d8
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions resources/views/components/repeater-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<thead @class([
'sr-only' => $hasHiddenHeader,
'filament-table-repeater-header rounded-t-xl overflow-hidden' => ! $hasHiddenHeader,
'border-b border-gray-300 dark:border-gray-700' => ! $hasHiddenHeader && $hasContainers,
'border-b border-gray-300 dark:border-gray-700' => ! $hasHiddenHeader,
])>
<tr class="md:divide-x md:rtl:divide-x-reverse md:divide-gray-300 dark:md:divide-gray-700 text-sm">
@foreach ($headers as $key => $header)
Expand All @@ -68,9 +68,23 @@
@endforeach
@if ($hasActions)
<th class="filament-table-repeater-header-column p-2 bg-gray-200/50 dark:bg-gray-900/60 w-px ltr:rounded-tr-xl rtl:rounded-tl-xl">
<span class="sr-only">
{{ __('filament-table-repeater::components.repeater.row_actions.label') }}
</span>
<div class="flex items-center md:justify-center">
@unless ($isItemMovementDisabled)
<div class="w-8"></div>
@endunless

@if ($isCloneable)
<div class="w-8"></div>
@endunless

@unless ($isItemDeletionDisabled)
<div class="w-8"></div>
@endunless

<span class="sr-only">
{{ __('filament-table-repeater::components.repeater.row_actions.label') }}
</span>
</div>
</th>
@endif
</tr>
Expand Down

0 comments on commit 48954d8

Please sign in to comment.