From 3dd96d043fc7055af4c298549d94c13b1c53fa4e Mon Sep 17 00:00:00 2001 From: ysCha Date: Mon, 12 Jan 2026 15:38:21 +0900 Subject: [PATCH] =?UTF-8?q?[1383]=EA=B2=AC=EC=A0=81=EC=84=9C=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=ED=85=9C=20=EC=9D=B8=EC=BD=94=EB=94=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/Estimate.jsx | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index ee2fab4b..9107dde0 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -2039,7 +2039,11 @@ export default function Estimate({}) { } }} menuPlacement={'auto'} - getOptionLabel={(x) => x.itemName + ' (' + x.itemNo + ')'} + getOptionLabel={(x) => { + // 메뉴 리스트에 보이는 텍스트 디코딩 + const doc = new DOMParser().parseFromString(x.itemName, 'text/html'); + return (doc.documentElement.textContent || x.itemName) + ' (' + x.itemNo + ')'; + }} getOptionValue={(x) => x.itemNo} components={{ SingleValue: ({ children, ...props }) => { @@ -2048,13 +2052,21 @@ export default function Estimate({}) { }} isClearable={false} isDisabled={!!item?.paDispOrder} - value={displayItemList.filter(function (option) { - if (item.itemNo === '') { - return false - } else { - return option.itemId === item.itemId + value={(() => { + const selectedOption = displayItemList.find((option) => { + return item.itemNo !== '' && option.itemId === item.itemId; + }); + + if (selectedOption) { + // 현재 선택된 값의 itemName을 실시간으로 디코딩하여 전달 + const doc = new DOMParser().parseFromString(selectedOption.itemName, 'text/html'); + return { + ...selectedOption, + itemName: doc.documentElement.textContent || selectedOption.itemName + }; } - })} + return null; + })()} /> ) : (