From 5e800c47264c66b08851f38eb7a33c911621b422 Mon Sep 17 00:00:00 2001 From: ohinhyuk <8156217@naver.com> Date: Wed, 6 Sep 2023 15:51:49 +0900 Subject: [PATCH] =?UTF-8?q?Feat=20:=20=EB=AF=B8=EB=B0=B0=EC=A0=95=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=84=A4=EC=A0=95=20=ED=95=98=EC=98=80=EC=9D=84=20?= =?UTF-8?q?=EB=95=8C=20=EA=B7=B8=EB=A3=B9=20=EB=AF=B8=EB=B0=B0=EC=A0=95?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=98=AE=EA=B2=A8=EC=A7=80=EA=B2=8C=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- histudy-front/src/components/Manager/GroupSelector.js | 7 +++++-- histudy-front/src/components/Manager/GroupTables.js | 5 ++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/histudy-front/src/components/Manager/GroupSelector.js b/histudy-front/src/components/Manager/GroupSelector.js index 531d888..4814c52 100644 --- a/histudy-front/src/components/Manager/GroupSelector.js +++ b/histudy-front/src/components/Manager/GroupSelector.js @@ -5,6 +5,7 @@ import { useRecoilValue } from "recoil"; import { groupAutoCompleteState } from "../../store/atom"; const groupData = [ + { label: "미배정" }, { label: "Group1" }, { label: "Group2" }, { label: "Group3" }, @@ -85,9 +86,11 @@ export default function GroupSelector({ team, setTeam }) { { // Autocomplete의 onChange는 (event, newValue)를 인자로 받습니다. - setTeam(newValue?.label?.slice(5)); + if (newValue?.label === "미배정") { + setTeam(undefined); + } else setTeam(newValue?.label?.slice(5)); }} - value={"Group" + team + ""} + value={team ? "Group" + team + "" : "미배정"} disablePortal id="combo-box-demo" options={groupData} // groupAutoComplete 값을 사용하도록 수정했습니다. diff --git a/histudy-front/src/components/Manager/GroupTables.js b/histudy-front/src/components/Manager/GroupTables.js index 3a053b8..14a6af2 100644 --- a/histudy-front/src/components/Manager/GroupTables.js +++ b/histudy-front/src/components/Manager/GroupTables.js @@ -59,7 +59,7 @@ export default function GroupTables({ const [sid, setSid] = useState(); const setIsLoading = useSetRecoilState(isLoadingState); - + console.log(data); return ( { alert("변경되었습니다!"); - window.location.reload(); + // window.location.reload(); }) .catch((error) => { alert("변경에 실패했습니다.");