diff --git a/frontend/lib/registry/components/table-list/TableListComponent.tsx b/frontend/lib/registry/components/table-list/TableListComponent.tsx index 127cc08b..7b374507 100644 --- a/frontend/lib/registry/components/table-list/TableListComponent.tsx +++ b/frontend/lib/registry/components/table-list/TableListComponent.tsx @@ -430,6 +430,9 @@ export const TableListComponent: React.FC = ({ const loadCategoryMappings = async () => { if (!tableConfig.selectedTable || !columnMeta) return; + // 로딩 중에는 매핑 로드하지 않음 (데이터 로드 완료 후에만 실행) + if (loading) return; + try { const categoryColumns = Object.entries(columnMeta) .filter(([_, meta]) => meta.inputType === "category") @@ -443,7 +446,8 @@ export const TableListComponent: React.FC = ({ console.log("🔄 [TableList] 카테고리 매핑 로드 시작:", { table: tableConfig.selectedTable, categoryColumns, - refreshTrigger, + dataLength: data.length, + loading, }); const mappings: Record> = {}; @@ -479,7 +483,7 @@ export const TableListComponent: React.FC = ({ }; loadCategoryMappings(); - }, [tableConfig.selectedTable, columnMeta, data.length]); // data.length로 데이터 변경 감지 + }, [tableConfig.selectedTable, columnMeta, loading]); // loading이 false가 될 때마다 갱신! // ======================================== // 데이터 가져오기