From 165eaf48bfb1b87525ab3588d14d0be58f23f08e Mon Sep 17 00:00:00 2001 From: Deeman Date: Tue, 24 Feb 2026 17:09:49 +0100 Subject: [PATCH] fix(admin): live search not firing on text input + spinner always visible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hx-trigger bug: "from:find input" in hx-trigger attaches the event listener to the first found in the form — which is the hidden CSRF token input. Typing in the visible search field never fires the listener on that element. Result: only Enter (form submit) triggered HTMX. Fix: drop "from:find input" so the listener is on the form itself, where input/change events from all children bubble naturally. Spinner visibility bug: .search-spinner { opacity: 0 } relied on our compiled output.css. HTMX ships its own built-in CSS for .htmx-indicator (opacity:0 → opacity:1 on htmx-request). Using class="htmx-indicator search-spinner" delegates hide/show to HTMX's own stylesheet with no dependency on whether output.css has been rebuilt. Our .search-spinner only handles positioning and the spin animation. Co-Authored-By: Claude Opus 4.6 --- web/src/padelnomics/admin/templates/admin/articles.html | 4 ++-- web/src/padelnomics/admin/templates/admin/emails.html | 4 ++-- web/src/padelnomics/admin/templates/admin/leads.html | 4 ++-- web/src/padelnomics/admin/templates/admin/scenarios.html | 4 ++-- web/src/padelnomics/admin/templates/admin/suppliers.html | 4 ++-- web/src/padelnomics/admin/templates/admin/users.html | 4 ++-- web/src/padelnomics/static/css/input.css | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/web/src/padelnomics/admin/templates/admin/articles.html b/web/src/padelnomics/admin/templates/admin/articles.html index 8bfbe89..137b295 100644 --- a/web/src/padelnomics/admin/templates/admin/articles.html +++ b/web/src/padelnomics/admin/templates/admin/articles.html @@ -28,7 +28,7 @@
@@ -67,7 +67,7 @@ -
@@ -53,7 +53,7 @@
-
-
-