roofConstruction 첫번째 trestleDetail null로 들어가는 버그 수정

This commit is contained in:
김민식 2025-04-08 15:54:31 +09:00
parent 91ccfcb20e
commit 468980abbc
2 changed files with 9 additions and 2 deletions

View File

@ -65,6 +65,12 @@ export const Orientation = forwardRef((props, ref) => {
], ],
} }
useEffect(() => {
if (selectedModules) {
setSelectedModules(moduleList.find((module) => module.itemId === selectedModules.itemId))
}
}, [selectedModules])
useEffect(() => { useEffect(() => {
if (selectedSurfaceType) { if (selectedSurfaceType) {
setInputRoughness(roughnessCodes.find((code) => code.clCode === managementState?.surfaceTypeValue)) setInputRoughness(roughnessCodes.find((code) => code.clCode === managementState?.surfaceTypeValue))
@ -312,8 +318,8 @@ export const Orientation = forwardRef((props, ref) => {
{moduleList && ( {moduleList && (
<QSelectBox <QSelectBox
options={moduleList} options={moduleList}
value={moduleSelectionInitParams} value={selectedModules}
targetKey={'moduleItemId'} targetKey={'itemId'}
sourceKey={'itemId'} sourceKey={'itemId'}
showKey={'itemNm'} showKey={'itemNm'}
onChange={(e) => handleChangeModule(e)} onChange={(e) => handleChangeModule(e)}

View File

@ -78,6 +78,7 @@ export function useModuleTrestle(props) {
setCvrChecked(selectedRoof?.construction?.cvrChecked ?? false) setCvrChecked(selectedRoof?.construction?.cvrChecked ?? false)
setSnowGdPossYn(selectedRoof?.construction?.snowGdPossYn ?? 'N') setSnowGdPossYn(selectedRoof?.construction?.snowGdPossYn ?? 'N')
setSnowGdChecked(selectedRoof?.construction?.snowGdChecked ?? false) setSnowGdChecked(selectedRoof?.construction?.snowGdChecked ?? false)
setTrestleDetail(selectedRoof?.trestleDetail)
}, [selectedRoof]) }, [selectedRoof])
useEffect(() => { useEffect(() => {