[상품 상세]
- 상풉 옵션별 ID노출 처리.
This commit is contained in:
@@ -1523,6 +1523,7 @@ const handleCartMove = useCallback(() => {
|
||||
disabled: detail.optStkQty <= 0,
|
||||
imageUrl: detail.optImgUrl || null,
|
||||
price: detail.priceInfo.split('|')[1],
|
||||
prodOptCdCval: detail.prodOptCdCval,
|
||||
})) || []),
|
||||
]}
|
||||
selectedIndex={selectedOptionItemIndex}
|
||||
|
||||
@@ -72,6 +72,7 @@ const CustomDropDown = ({
|
||||
|
||||
const selectedOption = normalizedOptions[selectedIndex];
|
||||
const selectedLabel = selectedOption?.label || placeholder;
|
||||
const selectedId = selectedOption?.prodOptCdCval ? selectedOption?.prodOptCdCval : null;
|
||||
const selectedImage = selectedOption?.imageUrl;
|
||||
|
||||
return (
|
||||
@@ -93,7 +94,7 @@ const CustomDropDown = ({
|
||||
className={styles.custom_dropdown__image}
|
||||
/>
|
||||
)}
|
||||
<div className={styles.custom_dropdown__text}>{selectedLabel}</div>
|
||||
<div className={styles.custom_dropdown__text}>{selectedLabel} {selectedId ? `ID : ${selectedId}` : ''}</div>
|
||||
</div>
|
||||
<div className={styles.custom_dropdown__icon}>
|
||||
<img src={iconDownArrow} alt="dropdown arrow" />
|
||||
@@ -108,7 +109,6 @@ const CustomDropDown = ({
|
||||
.map((option, reverseIndex) => {
|
||||
const originalIndex = normalizedOptions.length - 1 - reverseIndex;
|
||||
const isOptionDisabled = option.disabled;
|
||||
|
||||
return (
|
||||
<SpottableDiv
|
||||
key={originalIndex}
|
||||
@@ -133,7 +133,7 @@ const CustomDropDown = ({
|
||||
/>
|
||||
)}
|
||||
<span className={styles.custom_dropdown__optname}>
|
||||
{option.label}
|
||||
{option.label} {option.prodOptCdCval ? `ID : ${option.prodOptCdCval}` : ''}
|
||||
</span>
|
||||
{isOptionDisabled ? (
|
||||
<span className={styles.custom_dropdown__lasttxt}>
|
||||
|
||||
Reference in New Issue
Block a user