Show placeholder text in filter dropdowns instead of __all__

Pass null instead of "__all__" as the Select value when no filter is
active, so the placeholder text (Visit Type, Attendance, Service) is
displayed by the base-ui SelectValue component.

Made-with: Cursor
This commit is contained in:
Randall Stillwell 2026-03-11 18:40:29 -05:00
parent 1168c96ae2
commit 59c4af5db6

View file

@ -85,7 +85,7 @@ export function Filters({
<div className="flex items-center gap-2 overflow-x-auto">
<Select
value={visitType || "__all__"}
value={visitType || null}
onValueChange={(v: string | null) =>
updateParams({ visitType: !v || v === "__all__" ? undefined : v })
}
@ -104,7 +104,7 @@ export function Filters({
</Select>
<Select
value={attendanceDuration || "__all__"}
value={attendanceDuration || null}
onValueChange={(v: string | null) =>
updateParams({
attendanceDuration: !v || v === "__all__" ? undefined : v,
@ -125,7 +125,7 @@ export function Filters({
</Select>
<Select
value={serviceAttended || "__all__"}
value={serviceAttended || null}
onValueChange={(v: string | null) =>
updateParams({
serviceAttended: !v || v === "__all__" ? undefined : v,