diff --git a/egovframe-template-simple-react-contribution/src/components/list/ListCreateUpdateDelete.jsx b/egovframe-template-simple-react-contribution/src/components/list/ListCreateUpdateDelete.jsx index 826b282..eaeb9ca 100644 --- a/egovframe-template-simple-react-contribution/src/components/list/ListCreateUpdateDelete.jsx +++ b/egovframe-template-simple-react-contribution/src/components/list/ListCreateUpdateDelete.jsx @@ -61,12 +61,16 @@ const Item = styled(Paper)(({ theme }) => ({ function ListCreateUpdateDelete(props) { const handleClickOpen = () => { - if( props.itemIndex[props.depthSelectedArrayIndex-1] === undefined ) { - alert('상위 코드를 선택해주세요.'); - props.setIsPopupOpen(false); - return false; - } - props.setCreateCondition({...props.createCondition, paramCodeLevel : props.paramCodeLevel, paramOrgId : props.itemIndex[props.depthSelectedArrayIndex-1]}); + if( props.depthSelectedArrayIndex === 0 ) { + props.setCreateCondition({...props.createCondition, paramCodeLevel : props.paramCodeLevel, paramOrgId : "00"}); + } else { + if( props.itemIndex[props.depthSelectedArrayIndex-1] === undefined ) { + alert('상위 코드를 선택해주세요.'); + props.setIsPopupOpen(false); + return false; + } + props.setCreateCondition({...props.createCondition, paramCodeLevel : props.paramCodeLevel, paramOrgId : props.itemIndex[props.depthSelectedArrayIndex-1]}); + } props.setIsPopupOpen(true); };