From e3f97d20fb16f8afdd89b1bd1009e9d2b1d53119 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Fri, 14 Mar 2025 12:37:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=80=EB=B6=95=EC=9E=AC=20=ED=95=A0?= =?UTF-8?q?=EB=8B=B9=20=ED=8C=9D=EC=97=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useRoofAllocationSetting.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hooks/roofcover/useRoofAllocationSetting.js b/src/hooks/roofcover/useRoofAllocationSetting.js index 671d4c7e..536a2127 100644 --- a/src/hooks/roofcover/useRoofAllocationSetting.js +++ b/src/hooks/roofcover/useRoofAllocationSetting.js @@ -446,12 +446,10 @@ export function useRoofAllocationSetting(id) { * 지붕재 변경 */ const handleChangeRoofMaterial = (value, index) => { - const selectedIndex = roofMaterials.findIndex((roof) => roof.selected) - const selectedRoofMaterial = roofMaterials.find((roof) => roof.roofMatlCd === value.id) const newRoofList = currentRoofList.map((roof, idx) => { if (idx === index) { - return { ...selectedRoofMaterial } + return { ...selectedRoofMaterial, selected: roof.selected } } return roof })