[!WARNING] Deprecated.
FilterPopoveris replaced byFilterBar: filters sit in the toolbar row or a push-down panel, never a popover. It still works and stays exported until 1.0. Do not add new uses; see the migration guide. The rest of this page documents code still in the wild.
Deprecated — use FilterBar. A trigger button that opens a popover containing caller-supplied form fields, with a Clear All / Apply footer the compound enforces. Still exported and working in existing Provider, Member and Campus code until it is removed in 1.0.
[!NOTE] Compound component — an opinionated composition of Helix primitives. Composes:
Button,Popover,Badge.
Import
import { FilterPopover } from "@timelycare/helix-ui"
Usage
const [draft, setDraft] = useState({ memberId: "", visitId: "" })
const [applied, setApplied] = useState(draft)
const activeCount = Object.values(applied).filter(Boolean).length
<FilterPopover
triggerLabel="Filters"
activeCount={activeCount}
onApply={() => setApplied(draft)}
onClear={() => setDraft({ memberId: "", visitId: "" })}
>
<Input
placeholder="Member ID"
value={draft.memberId}
onChange={(e) => setDraft({ ...draft, memberId: e.target.value })}
/>
<Input
placeholder="Visit ID"
value={draft.visitId}
onChange={(e) => setDraft({ ...draft, visitId: e.target.value })}
/>
</FilterPopover>