diff --git a/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx b/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx index 1844583..50109aa 100644 --- a/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx @@ -73,13 +73,14 @@ function StandardCodeList(props) { const location = useLocation(); console.log("StandardCodeList [location] : ", location); - const cndRef = useRef(); + const category1Ref = useRef(); + const category2Ref = useRef(); const wrdRef = useRef(); const bbsId = location.state?.bbsId || NOTICE_BBS_ID; // eslint-disable-next-line no-unused-vars - const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || {listCode: listCode, pageIndex: 1, category1: '', searchWrd: ''});// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시 + const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || {listCode: listCode, pageIndex: 1, category1: '', category2: '', searchWrd: ''});// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시 const [masterBoard, setMasterBoard] = useState({}); const [paginationInfo, setPaginationInfo] = useState({}); @@ -88,6 +89,7 @@ function StandardCodeList(props) { /* 검색기능 추가 변수*/ const [listdata, setlistdata] = useState([]); const [filterData, setfilterData] = useState(''); + const [categoryList, setCategoryList] = useState([]); /* 탭 */ const [activeTab, setActiveTab] = useState('10'); @@ -97,9 +99,10 @@ function StandardCodeList(props) { retrieveList({ ...searchCondition, - category1: cndRef.current.value, - searchWrd: wrdRef.current.value, - tab: tabName + tab: tabName, + category1: category1Ref.current.value, + category2: category2Ref.current.value, + searchWrd: wrdRef.current.value }); }; @@ -122,6 +125,7 @@ function StandardCodeList(props) { setPaginationInfo(resp.result.paginationInfo); /*검색을 위한 리스트 state에 저장*/ setlistdata(resp.result.resultList); + setCategoryList(resp.result.categoryList); // 리스트 항목 구성 }, function (resp) { @@ -178,16 +182,16 @@ function StandardCodeList(props) { />
  • - {/*
  • +
  • -
  • + {/*