diff --git a/src/Components/LogUpdate/Sections/Vitals.tsx b/src/Components/LogUpdate/Sections/Vitals.tsx index 796575e4145..3fbc26c6b70 100644 --- a/src/Components/LogUpdate/Sections/Vitals.tsx +++ b/src/Components/LogUpdate/Sections/Vitals.tsx @@ -15,7 +15,7 @@ import PainChart from "../components/PainChart"; import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { - const handleBloodPressureChange = (event: FieldChangeEvent) => { + const handleBloodPressureChange = (event: FieldChangeEvent) => { const bp = { ...(log.bp ?? {}), [event.name]: event.value, @@ -146,9 +146,10 @@ const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { optionDisplay={(c) => c.label} optionValue={(c) => c.value || ""} value={log.rhythm} - onChange={(c) => - onChange({ rhythm: c.value as DailyRoundsModel["rhythm"] }) - } + onChange={(c) => { + const newValue = c.value === null ? undefined : c.value; + onChange({ rhythm: newValue as DailyRoundsModel["rhythm"] }); + }} />