Person page: make marriage-event spouse picker searchable

Adding a marriage/partnership event used a plain <select> for the spouse,
which is unusable on a large tree — you can't search, only scroll. Swap it
for the existing PersonCombobox (already used by the relationship form), which
filters by name as you type. No onCreate, so it still resolves to an existing
person id, which is what the partnership-event handler requires.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Justin Paul <[email protected]>
This commit is contained in:
2026-06-08 21:29:27 -04:00
co-authored by Claude Opus 4.8
parent ac0b9818dd
commit 62513ee22e
@@ -1060,18 +1060,12 @@ export default function PersonDetailPage() {
{isPartnershipType(evType) && (
<label className="flex flex-col gap-1">
<span className="text-xs text-[var(--muted)]">Spouse / partner</span>
<select
className={fieldCls}
<PersonCombobox
people={others}
value={evSpouse}
onChange={(e) => setEvSpouse(e.target.value)}
>
<option value=""> choose </option>
{others.map((p) => (
<option key={p.id} value={p.id}>
{p.primary_name ?? "Unnamed"}
</option>
))}
</select>
onChange={setEvSpouse}
placeholder="Search for a spouse…"
/>
</label>
)}
<label className="flex flex-col gap-1">