diff --git a/egovframe-template-simple-react-contribution/src/components/commonCode/CheckBox.jsx b/egovframe-template-simple-react-contribution/src/components/commonCode/CheckBox.jsx index 1d00e02..c46facd 100644 --- a/egovframe-template-simple-react-contribution/src/components/commonCode/CheckBox.jsx +++ b/egovframe-template-simple-react-contribution/src/components/commonCode/CheckBox.jsx @@ -11,13 +11,13 @@ function CheckBox({name, grpCd, selectedValue}){ }, []); useEffect(() => { - if(selectedValue){ + if(checkBox&&selectedValue){ const itemCdAry = selectedValue.split(','); itemCdAry.forEach(function(itemCd){ document.querySelector(`#chkBox_${itemCd}`).checked = true; }) } - }, [selectedValue]); + }, [checkBox]); function getCodeItemList() { EgovNet.requestFetch( diff --git a/egovframe-template-simple-react-contribution/src/components/commonCode/SelectOption.jsx b/egovframe-template-simple-react-contribution/src/components/commonCode/SelectOption.jsx index eb37263..e31cce5 100644 --- a/egovframe-template-simple-react-contribution/src/components/commonCode/SelectOption.jsx +++ b/egovframe-template-simple-react-contribution/src/components/commonCode/SelectOption.jsx @@ -10,6 +10,7 @@ function SelectOption({name, grpCd, selectedValue}){ useEffect(() => { getCodeItemList() }, []); + useEffect(() => { setValue(selectedValue) }, [selectedValue]); diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/users/List.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/users/List.jsx index b2b3818..4251f33 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/users/List.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/users/List.jsx @@ -20,7 +20,6 @@ function List({}) { }); const [listTag, setListTag] = useState([]); - const [userSeOption, setUserSeOption] = useState([]); const [paginationInfo, setPaginationInfo] = useState({}); @@ -40,32 +39,24 @@ function List({}) { (resp) => { setPaginationInfo(resp.result.paginationInfo); let mutListTag = []; - let userSeTag = []; setListTag([]); - setUserSeOption([]); // 리스트 항목 구성 resp.result.userList.forEach(function (item, index) { mutListTag.push(
검색된 결과가 없습니다.
); // 게시판 목록 초기값 - resp.result.userSeOption.forEach(function (item, index){ - userSeTag.push() - }) - setListTag(mutListTag); - setUserSeOption(userSeTag); }, function (resp) { console.log("err response : ", resp); @@ -85,9 +76,9 @@ function List({}) { setSearchCondition({...searchCondition, pageIndex: passedPage}) }); - function userInfoModal(userSeq){ + function userInfoModal(userInfo){ handleShow() - setModalBody(