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'}
getOptionLabel={(x) => {
//
const doc = new DOMParser().parseFromString(x.itemName, 'text/html');
return (doc.documentElement.textContent || x.itemName) + ' (' + x.itemNo + ')';
}}
getOptionLabel={(x) => x.itemName + ' (' + x.itemNo + ')'}
getOptionValue={(x) => x.itemNo}
components={{
SingleValue: ({ children, ...props }) => {
@ -2052,21 +2048,13 @@ export default function Estimate({}) {
}}
isClearable={false}
isDisabled={!!item?.paDispOrder}
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
};
value={displayItemList.filter(function (option) {
if (item.itemNo === '') {
return false
} else {
return option.itemId === item.itemId
}
return null;
})()}
})}
/>
) : (
<Select