#766품명오류
This commit is contained in:
parent
77e5fa9e8a
commit
c895a14fc8
@ -120,7 +120,15 @@ export default function Estimate({}) {
|
|||||||
const apiUrl = `/api/display-item/item-list?${queryStringFormatter(param)}`
|
const apiUrl = `/api/display-item/item-list?${queryStringFormatter(param)}`
|
||||||
post({ url: apiUrl, data: param }).then((res) => {
|
post({ url: apiUrl, data: param }).then((res) => {
|
||||||
if (res.length > 0) {
|
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호출
|
//견적특이사항 API호출
|
||||||
@ -1776,7 +1784,7 @@ export default function Estimate({}) {
|
|||||||
onChangeDisplayItem(e.itemId, item.dispOrder, index)
|
onChangeDisplayItem(e.itemId, item.dispOrder, index)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
defaultInputValue={item.itemName}
|
// defaultInputValue={item.itemName}
|
||||||
getOptionLabel={(x) => x.itemName}
|
getOptionLabel={(x) => x.itemName}
|
||||||
getOptionValue={(x) => x.itemId}
|
getOptionValue={(x) => x.itemId}
|
||||||
isClearable={false}
|
isClearable={false}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user