Compare commits
No commits in common. "363c19d9a044f285b2c69a85e8e3aa9cdbb7f0b6" and "aa837d8dbf3e6344f9ee59b2aca4c037d8ccdfe1" have entirely different histories.
363c19d9a0
...
aa837d8dbf
@ -2039,11 +2039,7 @@ export default function Estimate({}) {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
menuPlacement={'auto'}
|
menuPlacement={'auto'}
|
||||||
getOptionLabel={(x) => {
|
getOptionLabel={(x) => x.itemName + ' (' + x.itemNo + ')'}
|
||||||
// 메뉴 리스트에 보이는 텍스트 디코딩
|
|
||||||
const doc = new DOMParser().parseFromString(x.itemName, 'text/html');
|
|
||||||
return (doc.documentElement.textContent || x.itemName) + ' (' + x.itemNo + ')';
|
|
||||||
}}
|
|
||||||
getOptionValue={(x) => x.itemNo}
|
getOptionValue={(x) => x.itemNo}
|
||||||
components={{
|
components={{
|
||||||
SingleValue: ({ children, ...props }) => {
|
SingleValue: ({ children, ...props }) => {
|
||||||
@ -2052,21 +2048,13 @@ export default function Estimate({}) {
|
|||||||
}}
|
}}
|
||||||
isClearable={false}
|
isClearable={false}
|
||||||
isDisabled={!!item?.paDispOrder}
|
isDisabled={!!item?.paDispOrder}
|
||||||
value={(() => {
|
value={displayItemList.filter(function (option) {
|
||||||
const selectedOption = displayItemList.find((option) => {
|
if (item.itemNo === '') {
|
||||||
return item.itemNo !== '' && option.itemId === item.itemId;
|
return false
|
||||||
});
|
} else {
|
||||||
|
return 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;
|
})}
|
||||||
})()}
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user