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:
parent
1168c96ae2
commit
59c4af5db6
1 changed files with 3 additions and 3 deletions
|
|
@ -85,7 +85,7 @@ export function Filters({
|
||||||
|
|
||||||
<div className="flex items-center gap-2 overflow-x-auto">
|
<div className="flex items-center gap-2 overflow-x-auto">
|
||||||
<Select
|
<Select
|
||||||
value={visitType || "__all__"}
|
value={visitType || null}
|
||||||
onValueChange={(v: string | null) =>
|
onValueChange={(v: string | null) =>
|
||||||
updateParams({ visitType: !v || v === "__all__" ? undefined : v })
|
updateParams({ visitType: !v || v === "__all__" ? undefined : v })
|
||||||
}
|
}
|
||||||
|
|
@ -104,7 +104,7 @@ export function Filters({
|
||||||
</Select>
|
</Select>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
value={attendanceDuration || "__all__"}
|
value={attendanceDuration || null}
|
||||||
onValueChange={(v: string | null) =>
|
onValueChange={(v: string | null) =>
|
||||||
updateParams({
|
updateParams({
|
||||||
attendanceDuration: !v || v === "__all__" ? undefined : v,
|
attendanceDuration: !v || v === "__all__" ? undefined : v,
|
||||||
|
|
@ -125,7 +125,7 @@ export function Filters({
|
||||||
</Select>
|
</Select>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
value={serviceAttended || "__all__"}
|
value={serviceAttended || null}
|
||||||
onValueChange={(v: string | null) =>
|
onValueChange={(v: string | null) =>
|
||||||
updateParams({
|
updateParams({
|
||||||
serviceAttended: !v || v === "__all__" ? undefined : v,
|
serviceAttended: !v || v === "__all__" ? undefined : v,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue