Add clear selection button to status multi-select dropdown
Build & Push / Test (client) (push) Successful in 25s
Build & Push / Test (server) (push) Successful in 30s
Build & Push / Build Client (push) Successful in 59s
Build & Push / Build Server (push) Successful in 1m10s

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 <noreply@anthropic.com>
This commit is contained in:
2026-04-23 12:25:53 -04:00
parent c6ec47a8fc
commit 2d9464a6fb
2 changed files with 21 additions and 1 deletions
@@ -164,6 +164,25 @@ export default function TicketFilters({
{STATUS_LABELS[s] ?? s}
</DropdownMenuItem>
))}
{selectedStatuses.length > 0 && (
<>
<DropdownMenuSeparator />
<DropdownMenuItem
onSelect={(e) => {
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
</DropdownMenuItem>
</>
)}
</DropdownMenuContent>
</DropdownMenu>
+2 -1
View File
@@ -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') ?? '';