fix: 카테고리 값 매핑을 올바른 속성명으로 수정

문제:
- value: undefined, label: undefined
- 잘못된 속성명 사용 (categoryValue, categoryLabel)

원인:
- API 응답 실제 구조:
  - valueCode: 'CATEGORY_154396'
  - valueLabel: '대기'

해결:
- v.categoryValue → v.valueCode
- v.categoryLabel → v.valueLabel

이제 다중선택 카테고리 select가 완벽히 작동합니다:
 다중선택 모드 활성화
 카테고리 옵션 로딩
 라벨 정상 표시
 콤마 구분자로 저장
This commit is contained in:
kjs 2025-11-21 09:40:24 +09:00
parent 114a807d79
commit f4d27f51a3
1 changed files with 2 additions and 2 deletions

View File

@ -165,8 +165,8 @@ const SelectBasicComponent: React.FC<SelectBasicComponentProps> = ({
const activeValues = response.data.filter((v) => v.isActive !== false);
const options = activeValues.map((v) => ({
value: v.category_value || v.categoryValue || v.value,
label: v.category_label || v.categoryLabel || v.label || v.category_value || v.categoryValue || v.value,
value: v.valueCode,
label: v.valueLabel || v.valueCode,
}));
console.log("✅ [SelectBasic] 카테고리 옵션 설정:", {