From c6f5899949772bccd3cebc562c5e75651088d600 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Thu, 29 Oct 2026 11:05:39 +0100 Subject: [PATCH] feat(tables): show loading state while a server-side sort runs --- .../views/components/table/sort-header.blade.php | 14 +++++++++++--- resources/views/livewire/dashboard.blade.php | 6 ++++-- .../project/application/deployment/index.blade.php | 2 +- .../views/livewire/server/docker-images.blade.php | 2 +- .../views/livewire/server/resources.blade.php | 4 ++-- resources/views/livewire/tags/show.blade.php | 3 ++- .../views/livewire/team/invitations.blade.php | 3 ++- 7 files changed, 23 insertions(+), 11 deletions(-) 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