Save the Primary Contact country, state and time zone

Fixkamo-internal
Shipped
September 2, 2026 at 5:05 PM UTC
Author
Kamo
Commit
264d3ac

The Primary Contact card's country, state and time zone are top-level Lead fields — neither members of primaryContact nor of addressMailing — and the two wire builders in leadsApi copy the patch key by key, dropping anything they do not name. These three were never named, so the PUT body left without them: the save returned 200, the toast said "Contact saved", and the fields came back empty. **************** were named, which is why the Mailing Address card worked and the identically shaped Primary Contact fields did not. That also explains the state control looking different between the two cards. Both render the same SubdivisionField, which draws its dropdown only once the country reads UNITED_STATES; with the contact country unable to persist, it fell through to a free-text box on every open. It becomes a picker on its own now that the country survives a save. Nothing 400ed and nothing logged, so the only trace was in the data: subdivision and timezone were NULL on all 14,450 rows of `leads`, against 14,387 rows with a mailing country. Send the time zone raw rather than `|| undefined` while here, matching the country and subdivision beside it — the server reads "" as an explicit clear, so collapsing it dropped the key and left a time zone no member could remove.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing