#766품명오류

This commit is contained in:
basssy 2025-02-18 12:35:42 +09:00
parent 77e5fa9e8a
commit c895a14fc8

View File

@ -120,7 +120,15 @@ export default function Estimate({}) {
const apiUrl = `/api/display-item/item-list?${queryStringFormatter(param)}`
post({ url: apiUrl, data: param }).then((res) => {
if (res.length > 0) {
setDisplayItemList(res)
let tempList
let updatedRes = []
if (estimateContextState?.itemList.length > 0) {
tempList = estimateContextState.itemList.filter((item) => !res.some((resItem) => resItem.itemId === item.itemId))
updatedRes = [...res, ...tempList]
} else {
updatedRes = [...res]
}
setDisplayItemList(updatedRes)
}
})
// API
@ -1776,7 +1784,7 @@ export default function Estimate({}) {
onChangeDisplayItem(e.itemId, item.dispOrder, index)
}
}}
defaultInputValue={item.itemName}
// defaultInputValue={item.itemName}
getOptionLabel={(x) => x.itemName}
getOptionValue={(x) => x.itemId}
isClearable={false}