From a6eef00ba7f6e19830d97b3a15dd69b5875c6d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Mon, 20 Jul 2026 08:12:07 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20exam=20room=20value=20res?= =?UTF-8?q?et=20on=20unchanged=20question=20-=20guard=20createEffect=20wit?= =?UTF-8?q?h=20questionId=20check,=20only=20reset=20value=20on=20actual=20?= =?UTF-8?q?question=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/exams/exam-room-ws.tsx | 3 +++ src/components/exams/student-exam-room.tsx | 3 +++ 2 files changed, 6 insertions(+) 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