diff --git a/src/pages/lectures/LectureDetails.tsx b/src/pages/lectures/LectureDetails.tsx index 9ad66ce..31cf5e3 100644 --- a/src/pages/lectures/LectureDetails.tsx +++ b/src/pages/lectures/LectureDetails.tsx @@ -204,7 +204,7 @@ function LectureDetails() { options={topicOptions} activeValue={activeValue} setActiveValue={(value) => { - lectureForm.setValue("topicId", +value.value); + lectureForm.setValue("topicId", +value.value, { shouldDirty: true }); setActiveValue(value); }} label="Топик" diff --git a/src/pages/sections/SectionDetails.tsx b/src/pages/sections/SectionDetails.tsx index db52f2a..c4b8d07 100644 --- a/src/pages/sections/SectionDetails.tsx +++ b/src/pages/sections/SectionDetails.tsx @@ -163,7 +163,9 @@ function SectionDetails() { options={subjectOptions} activeValue={activeValue} setActiveValue={(value) => { - sectionForm.setValue("subjectId", +value.value); + sectionForm.setValue("subjectId", +value.value, { + shouldDirty: true, + }); setActiveValue(value); }} label="Предмет" diff --git a/src/pages/tasks/TaskDetails.tsx b/src/pages/tasks/TaskDetails.tsx index 154e673..03d3369 100644 --- a/src/pages/tasks/TaskDetails.tsx +++ b/src/pages/tasks/TaskDetails.tsx @@ -204,7 +204,7 @@ function TaskDetails() { options={topicOptions} activeValue={activeValue} setActiveValue={(value) => { - taskForm.setValue("topicId", +value.value); + taskForm.setValue("topicId", +value.value, { shouldDirty: true }); setActiveValue(value); }} label="Топик" diff --git a/src/pages/topics/TopicDetails.tsx b/src/pages/topics/TopicDetails.tsx index af57a2c..a209aab 100644 --- a/src/pages/topics/TopicDetails.tsx +++ b/src/pages/topics/TopicDetails.tsx @@ -206,7 +206,7 @@ function TopicDetails() { options={sectionOptions} activeValue={activeValue} setActiveValue={(value) => { - topicForm.setValue("sectionId", +value.value); + topicForm.setValue("sectionId", +value.value, { shouldDirty: true }); setActiveValue(value); }} label="Раздел"