Compare commits

..

No commits in common. "b19ce80aee125627f79f8f8bc69173c1df4b17cc" and "87a3a78bd1f2fe8098b8ef95a90a0379b89f4b48" 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