fix: 화면 전환 후 카테고리 매핑 갱신 문제 해결

- useEffect 의존성 배열에 refreshTrigger 추가
- 데이터 새로고침 시 카테고리 매핑도 자동 갱신
- 매핑 로드 시작/종료 로그 추가하여 디버깅 용이성 향상
This commit is contained in:
kjs 2025-11-06 12:20:58 +09:00
parent 939a8696c8
commit 49935189b6
1 changed files with 11 additions and 2 deletions

View File

@ -435,7 +435,16 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
.filter(([_, meta]) => meta.inputType === "category")
.map(([columnName, _]) => columnName);
if (categoryColumns.length === 0) return;
if (categoryColumns.length === 0) {
console.log("⚠️ [TableList] 카테고리 컬럼 없음");
return;
}
console.log("🔄 [TableList] 카테고리 매핑 로드 시작:", {
table: tableConfig.selectedTable,
categoryColumns,
refreshTrigger,
});
const mappings: Record<string, Record<string, { label: string; color?: string }>> = {};
@ -470,7 +479,7 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
};
loadCategoryMappings();
}, [tableConfig.selectedTable, columnMeta]);
}, [tableConfig.selectedTable, columnMeta, refreshTrigger]);
// ========================================
// 데이터 가져오기