From 70dc24f7a1a06d1e5f6b7a955137b0f02e53ae93 Mon Sep 17 00:00:00 2001 From: kjs Date: Thu, 6 Nov 2025 12:26:07 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20columnMeta=20=EB=A1=9C=EB=94=A9=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C=20=ED=9B=84=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EB=A7=A4=ED=95=91=20=EB=A1=9C=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - columnMeta가 비어있을 때 로딩 대기 로그 출력 - columnMeta 준비 완료 후에만 카테고리 매핑 시도 - 카테고리 컬럼 없음 로그에 디버깅 정보 추가 - 화면 전환 시 columnMeta → 카테고리 매핑 순서 보장 --- .../components/table-list/TableListComponent.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/lib/registry/components/table-list/TableListComponent.tsx b/frontend/lib/registry/components/table-list/TableListComponent.tsx index 7b374507..8b94ef15 100644 --- a/frontend/lib/registry/components/table-list/TableListComponent.tsx +++ b/frontend/lib/registry/components/table-list/TableListComponent.tsx @@ -428,18 +428,29 @@ export const TableListComponent: React.FC = ({ useEffect(() => { const loadCategoryMappings = async () => { - if (!tableConfig.selectedTable || !columnMeta) return; + if (!tableConfig.selectedTable) return; // 로딩 중에는 매핑 로드하지 않음 (데이터 로드 완료 후에만 실행) if (loading) return; + // columnMeta가 비어있으면 대기 + const columnMetaKeys = Object.keys(columnMeta || {}); + if (columnMetaKeys.length === 0) { + console.log("⏳ [TableList] columnMeta 로딩 대기 중..."); + return; + } + try { const categoryColumns = Object.entries(columnMeta) .filter(([_, meta]) => meta.inputType === "category") .map(([columnName, _]) => columnName); if (categoryColumns.length === 0) { - console.log("⚠️ [TableList] 카테고리 컬럼 없음"); + console.log("⚠️ [TableList] 카테고리 컬럼 없음:", { + table: tableConfig.selectedTable, + columnMetaKeys, + columnMeta, + }); return; }