Skip to content

Commit bc534da

Browse files
committed
Fix the disappear of search field, sort and import buttons after creating a student
1 parent 9c496aa commit bc534da

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

client/src/pages/studentmanagement/TutorStudentmanagement.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ function TutorStudentmanagement(): JSX.Element {
2424
isEditorOpen: false,
2525
});
2626

27-
useEffect(() => {
28-
setEditorState({ isAnimating: false, isEditorOpen: false });
29-
}, [tutorialId]);
30-
3127
const { students, teams, summaries, isLoading, createStudent, editStudent, deleteStudent } =
3228
useStudentsForStudentList({ tutorialId });
3329

30+
useEffect(() => {
31+
setEditorState({ isAnimating: false, isEditorOpen: false });
32+
}, [students]);
33+
3434
const handleCreateSubmit: StudentFormSubmitCallback = useCallback(
3535
async (values, helpers) => {
3636
const dto = convertFormStateToDTO(values, tutorialId);

0 commit comments

Comments
 (0)