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("변경에 실패했습니다.");