From 1d8460e3faf39e413e4dbe0214436ccb23c710f8 Mon Sep 17 00:00:00 2001 From: kasterra Date: Wed, 29 May 2024 19:03:35 +0900 Subject: [PATCH] fix : close dropdown when clicked --- app/routes/_procted+/grade+/$lectureId+/index.tsx | 1 + .../_procted+/students+/$lectureId+/$labId+/history+/index.tsx | 2 ++ app/routes/_procted+/students+/$lectureId+/Table.tsx | 1 + 3 files changed, 4 insertions(+) diff --git a/app/routes/_procted+/grade+/$lectureId+/index.tsx b/app/routes/_procted+/grade+/$lectureId+/index.tsx index c0b81b5..d31397f 100644 --- a/app/routes/_procted+/grade+/$lectureId+/index.tsx +++ b/app/routes/_procted+/grade+/$lectureId+/index.tsx @@ -188,6 +188,7 @@ const TableHeader = () => { semester ? `?semester=${semester}` : "" }` ); + setIsOpen((prev) => !prev); }} > {lecture.title} diff --git a/app/routes/_procted+/students+/$lectureId+/$labId+/history+/index.tsx b/app/routes/_procted+/students+/$lectureId+/$labId+/history+/index.tsx index 38b584b..e3cbeac 100644 --- a/app/routes/_procted+/students+/$lectureId+/$labId+/history+/index.tsx +++ b/app/routes/_procted+/students+/$lectureId+/$labId+/history+/index.tsx @@ -144,6 +144,7 @@ const TableHeader = () => { navigate( `/students/${params.lectureId}/${practice.id}/history` ); + setIsPracticeListOpen(false); }} > {practice.title} @@ -163,6 +164,7 @@ const TableHeader = () => { onClick={() => { if (problem.id !== -1) setSearchParams({ problemId: problem.id.toString() }); + setIsProblemListOpen(false); }} > {problem.title} diff --git a/app/routes/_procted+/students+/$lectureId+/Table.tsx b/app/routes/_procted+/students+/$lectureId+/Table.tsx index 8d7603e..09f01c6 100644 --- a/app/routes/_procted+/students+/$lectureId+/Table.tsx +++ b/app/routes/_procted+/students+/$lectureId+/Table.tsx @@ -212,6 +212,7 @@ const TableHeader = () => { semester ? `?semester=${semester}` : "" }` ); + setIsOpen((prev) => !prev); }} > {lecture.title}