From 2d9464a6fbdde620cc3e8a7d2800396195fafc8c Mon Sep 17 00:00:00 2001 From: josh Date: Thu, 23 Apr 2026 12:25:53 -0400 Subject: [PATCH] Add clear selection button to status multi-select dropdown Shows a separator and centered "Clear selection" at the bottom of the dropdown when any statuses are selected. Clearing shows all tickets regardless of status. Co-Authored-By: Claude Opus 4.6 --- client/src/pages/tickets/TicketFilters.tsx | 19 +++++++++++++++++++ client/src/pages/tickets/Tickets.tsx | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/client/src/pages/tickets/TicketFilters.tsx b/client/src/pages/tickets/TicketFilters.tsx index fbefdac..f5aef60 100644 --- a/client/src/pages/tickets/TicketFilters.tsx +++ b/client/src/pages/tickets/TicketFilters.tsx @@ -164,6 +164,25 @@ export default function TicketFilters({ {STATUS_LABELS[s] ?? s} ))} + {selectedStatuses.length > 0 && ( + <> + + { + e.preventDefault(); + onSetParams((prev) => { + const next = new URLSearchParams(prev); + next.set('status', ''); + next.delete('page'); + return next; + }); + }} + className="justify-center text-xs text-muted-foreground" + > + Clear selection + + + )} diff --git a/client/src/pages/tickets/Tickets.tsx b/client/src/pages/tickets/Tickets.tsx index fd7e576..4ae8643 100644 --- a/client/src/pages/tickets/Tickets.tsx +++ b/client/src/pages/tickets/Tickets.tsx @@ -44,7 +44,8 @@ export default function Tickets() { const { data: users = [] } = useUsers(); const DEFAULT_STATUSES = 'OPEN,IN_PROGRESS'; - const status = params.get('status') ?? DEFAULT_STATUSES; + const statusParam = params.get('status'); + const status = statusParam === null ? DEFAULT_STATUSES : statusParam; const severity = params.get('severity') ?? ''; const assigneeId = params.get('assigneeId') ?? ''; const categoryId = params.get('categoryId') ?? '';