From 114a807d7985a763589e8ceb2a34e7e8e6e2ae37 Mon Sep 17 00:00:00 2001 From: kjs Date: Fri, 21 Nov 2025 09:39:09 +0900 Subject: [PATCH] =?UTF-8?q?debug:=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC?= =?UTF-8?q?=20API=20=EC=9D=91=EB=8B=B5=20=EC=9B=90=EB=B3=B8=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EA=B5=AC=EC=A1=B0=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제: - value: undefined, label: undefined로 나옴 - v.categoryValue, v.categoryLabel이 존재하지 않음 디버깅: - API 응답의 첫 번째 항목 전체 출력 - 객체의 모든 키 목록 출력 - 여러 가능한 속성명 시도: - category_value / categoryValue / value - category_label / categoryLabel / label 다음 단계: - 콘솔에서 원본 데이터 구조 확인 - 실제 속성명에 맞게 매핑 수정 --- .../components/select-basic/SelectBasicComponent.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/lib/registry/components/select-basic/SelectBasicComponent.tsx b/frontend/lib/registry/components/select-basic/SelectBasicComponent.tsx index 0e438da6..497dd5c0 100644 --- a/frontend/lib/registry/components/select-basic/SelectBasicComponent.tsx +++ b/frontend/lib/registry/components/select-basic/SelectBasicComponent.tsx @@ -158,10 +158,15 @@ const SelectBasicComponent: React.FC = ({ console.log("🔍 [SelectBasic] 카테고리 API 응답:", response); if (response.success && response.data) { + console.log("🔍 [SelectBasic] 원본 데이터 샘플:", { + firstItem: response.data[0], + keys: response.data[0] ? Object.keys(response.data[0]) : [], + }); + const activeValues = response.data.filter((v) => v.isActive !== false); const options = activeValues.map((v) => ({ - value: v.categoryValue, - label: v.categoryLabel || v.categoryValue, + value: v.category_value || v.categoryValue || v.value, + label: v.category_label || v.categoryLabel || v.label || v.category_value || v.categoryValue || v.value, })); console.log("✅ [SelectBasic] 카테고리 옵션 설정:", {