diff --git a/src/components/exams/exam-room-ws.tsx b/src/components/exams/exam-room-ws.tsx index f2f6dfd..399fc17 100644 --- a/src/components/exams/exam-room-ws.tsx +++ b/src/components/exams/exam-room-ws.tsx @@ -550,8 +550,11 @@ function QuestionAnswerCardWS(props: { : props.question.answer?.text ?? "", ); const [saved, setSaved] = createSignal(false); + let questionId = props.question.id; createEffect(() => { + if (props.question.id === questionId) return; + questionId = props.question.id; setValue( props.question.kind === "choice" ? props.question.answer?.selected != null diff --git a/src/components/exams/student-exam-room.tsx b/src/components/exams/student-exam-room.tsx index a22e49d..9abb1af 100644 --- a/src/components/exams/student-exam-room.tsx +++ b/src/components/exams/student-exam-room.tsx @@ -259,8 +259,11 @@ function QuestionAnswerCard(props: { : props.question.answer?.text ?? "", ); const [saved, setSaved] = createSignal(false); + let questionId = props.question.id; createEffect(() => { + if (props.question.id === questionId) return; + questionId = props.question.id; setValue( props.question.kind === "choice" ? props.question.answer?.selected != null