summaryrefslogtreecommitdiff
path: root/resources/views/table.blade.php
diff options
context:
space:
mode:
authorSam Light <samlight1994@gmail.com>2025-03-30 14:20:57 +0100
committerSam Light <samlight1994@gmail.com>2025-03-30 14:20:57 +0100
commite744b8d67ef1d18050158dd523ba7d804c1c8528 (patch)
tree56c90a83912bd63bdd507e76e5ef00c82a904b50 /resources/views/table.blade.php
parenta883170dd1c723bcd02916f9bc8a96ed85a61761 (diff)
Filters, sorting, escaping and more....
Diffstat (limited to 'resources/views/table.blade.php')
-rw-r--r--resources/views/table.blade.php10
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>