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'}
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