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