Compare commits

..

No commits in common. "363c19d9a044f285b2c69a85e8e3aa9cdbb7f0b6" and "aa837d8dbf3e6344f9ee59b2aca4c037d8ccdfe1" have entirely different histories.

View File

@ -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