mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Refactor header cell component to use a span instead of a button for sortable elements
This commit is contained in:
@@ -23,14 +23,14 @@
|
||||
@endif
|
||||
{{ $attributes->class(['fi-ta-header-cell px-3 py-3.5 sm:first-of-type:ps-6 sm:last-of-type:pe-6']) }}
|
||||
>
|
||||
<{{ $sortable ? 'button' : 'span' }}
|
||||
<span
|
||||
@if ($sortable)
|
||||
aria-label="{{ trim(strip_tags($slot)) }}"
|
||||
type="button"
|
||||
wire:click="sortTable('{{ $name }}')"
|
||||
@endif
|
||||
@class([
|
||||
'group flex w-full items-center gap-x-1',
|
||||
'cursor-pointer' => $sortable,
|
||||
'whitespace-nowrap' => ! $wrap,
|
||||
'whitespace-normal' => $wrap,
|
||||
match ($alignment) {
|
||||
@@ -67,5 +67,5 @@
|
||||
])
|
||||
/>
|
||||
@endif
|
||||
</{{ $sortable ? 'button' : 'span' }}>
|
||||
</span>
|
||||
</th>
|
||||
|
||||
Reference in New Issue
Block a user