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(() => {
if (selectedSurfaceType) {
setInputRoughness(roughnessCodes.find((code) => code.clCode === managementState?.surfaceTypeValue))
@ -312,8 +318,8 @@ export const Orientation = forwardRef((props, ref) => {
{moduleList && (
<QSelectBox
options={moduleList}
value={moduleSelectionInitParams}
targetKey={'moduleItemId'}
value={selectedModules}
targetKey={'itemId'}
sourceKey={'itemId'}
showKey={'itemNm'}
onChange={(e) => handleChangeModule(e)}

View File

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