Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle unknown option in rhythm properly in detail update #8409

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/Components/LogUpdate/Sections/Vitals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils";

const Vitals = ({ log, onChange }: LogUpdateSectionProps) => {
const handleBloodPressureChange = (event: FieldChangeEvent<number>) => {
const handleBloodPressureChange = (event: FieldChangeEvent) => {

Check failure on line 18 in src/Components/LogUpdate/Sections/Vitals.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (1)

Generic type 'FieldChangeEvent' requires 1 type argument(s).

Check failure on line 18 in src/Components/LogUpdate/Sections/Vitals.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (6)

Generic type 'FieldChangeEvent' requires 1 type argument(s).

Check failure on line 18 in src/Components/LogUpdate/Sections/Vitals.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (5)

Generic type 'FieldChangeEvent' requires 1 type argument(s).

Check failure on line 18 in src/Components/LogUpdate/Sections/Vitals.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (4)

Generic type 'FieldChangeEvent' requires 1 type argument(s).

Check failure on line 18 in src/Components/LogUpdate/Sections/Vitals.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (2)

Generic type 'FieldChangeEvent' requires 1 type argument(s).

Check failure on line 18 in src/Components/LogUpdate/Sections/Vitals.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (7)

Generic type 'FieldChangeEvent' requires 1 type argument(s).

Check failure on line 18 in src/Components/LogUpdate/Sections/Vitals.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (3)

Generic type 'FieldChangeEvent' requires 1 type argument(s).

Check failure on line 18 in src/Components/LogUpdate/Sections/Vitals.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (8)

Generic type 'FieldChangeEvent' requires 1 type argument(s).
nihal467 marked this conversation as resolved.
Show resolved Hide resolved
const bp = {
...(log.bp ?? {}),
[event.name]: event.value,
Expand Down Expand Up @@ -146,9 +146,10 @@
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"] });
}}
/>
<TextAreaFormField
label="Heartbeat Description"
Expand Down
Loading