diff options
Diffstat (limited to 'resources/views/table.blade.php')
-rw-r--r-- | resources/views/table.blade.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/resources/views/table.blade.php b/resources/views/table.blade.php index bcefe57..448a290 100644 --- a/resources/views/table.blade.php +++ b/resources/views/table.blade.php @@ -9,7 +9,15 @@ <thead> <tr> @foreach($columns as $column) - <th scope="col">{{ $column->getTitle() }}</th> + <th + scope="col" + @class(['sortable' => $column->isSortable()]) + @if($column->isSortable()) + wire:click="orderBy('{{ $column->name }}')" + @endif + > + {{ $column->getTitle() }} + </th> @endforeach </tr> </thead> |