From 38cb4005b2c727940f26ec2e4cebd341b36bb725 Mon Sep 17 00:00:00 2001 From: basssy Date: Thu, 14 Nov 2024 12:08:21 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20=EC=83=81?= =?UTF-8?q?=EC=84=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/Estimate.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index 4861e75c..1030962c 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -272,7 +272,7 @@ export default function Estimate({ params }) { updates.objectNo = objectNo updates.planNo = planNo updates.itemId = res.itemId - updates.itemNo = '' //예정 + updates.itemNo = res.itemNo updates.itemName = res.itemName updates.itemChangeFlg = '1' //무조건 1 updates.partAdd = '1' //무조건1 NEW @@ -316,6 +316,7 @@ export default function Estimate({ params }) { }) }) + // 필터안하고 플래그로 관리하는거로 변경하기 const result = state.itemList.filter((item) => { return !tempList.some((other) => other.dispOrder === item.dispOrder) }) @@ -879,7 +880,11 @@ export default function Estimate({ params }) { classNamePrefix="custom" placeholder="Select" options={displayItemList} - onChange={(e) => onChangeDisplayItem(e.itemId, item.dispOrder)} + onChange={(e) => { + if (isObjectNotEmpty(e)) { + onChangeDisplayItem(e.itemId, item.dispOrder) + } + }} getOptionLabel={(x) => x.itemName} getOptionValue={(x) => x.itemId} isClearable={true} @@ -889,8 +894,8 @@ export default function Estimate({ params }) { })} /> - {/* {item?.itemChangeFlg === '1' && ( */} - {item?.partAdd === '1' && ( + {/* {item?.partAdd === '1' && ( */} + {item?.itemChangeFlg === '1' && (