견적서 displayItemList 수정

This commit is contained in:
basssy 2025-02-27 15:46:46 +09:00
parent 84fb70eb33
commit 6195e7fb4a

View File

@ -50,6 +50,7 @@ export default function Estimate({}) {
const [hidden, setHidden] = useState(true) const [hidden, setHidden] = useState(true)
// //
const [originDisplayItemList, setOriginDisplayItemList] = useState([])
const [displayItemList, setDisplayItemList] = useState([]) const [displayItemList, setDisplayItemList] = useState([])
// //
@ -122,6 +123,8 @@ export default function Estimate({}) {
} else { } else {
updatedRes = [...res] updatedRes = [...res]
} }
setOriginDisplayItemList(res)
setDisplayItemList(updatedRes) setDisplayItemList(updatedRes)
} }
}) })
@ -1775,7 +1778,7 @@ export default function Estimate({}) {
className="react-select-custom" className="react-select-custom"
classNamePrefix="custom" classNamePrefix="custom"
placeholder="Select" placeholder="Select"
options={displayItemList} options={originDisplayItemList}
onChange={(e) => { onChange={(e) => {
if (isObjectNotEmpty(e)) { if (isObjectNotEmpty(e)) {
onChangeDisplayItem(e.itemId, item.dispOrder, index) onChangeDisplayItem(e.itemId, item.dispOrder, index)