diff --git a/resources/views/components/table/sort-header.blade.php b/resources/views/components/table/sort-header.blade.php index 12ce2327d3..ab089ed623 100644 --- a/resources/views/components/table/sort-header.blade.php +++ b/resources/views/components/table/sort-header.blade.php @@ -5,7 +5,8 @@ Alpine tables set `model` (the sort variable in the enclosing x-data scope) and an optional `then` expression that runs after the change (for example `page = 1`). Livewire tables set `action` (a component method that takes the sort value) and - `current` (the current server-side sort value). + `current` (the current server-side sort value). While that request runs, the + clicked header shows a spinner. @param string $label @param string $asc sort value for ascending order @@ -37,15 +38,22 @@ default => null, }; $nextValue = $current === $firstValue ? $otherValue : $firstValue; + $call = $action.'('.\Illuminate\Support\Js::from($nextValue).')'; @endphp - @else