From e9d2060b0db90a52ca7a989d2eba2e1ff86fdd14 Mon Sep 17 00:00:00 2001 From: Andreas <60923027+starheim98@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:56:52 +0100 Subject: [PATCH] Endre svar-enhet lagerer svaret (#495) * change unit saves answer * change unit saves answer --- frontend/beCompliant/src/components/answers/TimeAnswer.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/beCompliant/src/components/answers/TimeAnswer.tsx b/frontend/beCompliant/src/components/answers/TimeAnswer.tsx index 0e7046c7..b33b9759 100644 --- a/frontend/beCompliant/src/components/answers/TimeAnswer.tsx +++ b/frontend/beCompliant/src/components/answers/TimeAnswer.tsx @@ -50,6 +50,9 @@ export function TimeAnswer({ const handleTimeAnswerUnit = (e: React.ChangeEvent) => { const timeUnit = e.target.value; setAnswerUnit(timeUnit); + if (value) { + submitAnswer(value, timeUnit); + } }; return (