Skip to content

Commit

Permalink
fix the unknown option in rhythm
Browse files Browse the repository at this point in the history
  • Loading branch information
nihal467 committed Aug 22, 2024
1 parent a34d9e3 commit 06de15a
Showing 1 changed file with 5 additions and 4 deletions.
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 PainChart from "../components/PainChart";
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).
const bp = {
...(log.bp ?? {}),
[event.name]: event.value,
Expand Down Expand Up @@ -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"] });
}}
/>
<TextAreaFormField
label="Heartbeat Description"
Expand Down

0 comments on commit 06de15a

Please sign in to comment.