엔티티컬럼 표시설정 수정
This commit is contained in:
@@ -4104,13 +4104,14 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
|
||||
// 선택된 컬럼들의 값을 구분자로 조합
|
||||
const values = displayColumns
|
||||
.map((colName: string) => {
|
||||
// 1. 먼저 직접 컬럼명으로 시도 (기본 테이블 컬럼인 경우)
|
||||
let cellValue = rowData[colName];
|
||||
// 🎯 백엔드 alias 규칙: ${sourceColumn}_${displayColumn}
|
||||
// 예: manager 컬럼에서 user_name 선택 시 → manager_user_name
|
||||
const joinedKey = `${column.columnName}_${colName}`;
|
||||
let cellValue = rowData[joinedKey];
|
||||
|
||||
// 2. 없으면 ${sourceColumn}_${colName} 형식으로 시도 (조인 테이블 컬럼인 경우)
|
||||
// fallback: 직접 컬럼명으로 시도 (기본 테이블 컬럼인 경우)
|
||||
if (cellValue === null || cellValue === undefined) {
|
||||
const joinedKey = `${column.columnName}_${colName}`;
|
||||
cellValue = rowData[joinedKey];
|
||||
cellValue = rowData[colName];
|
||||
}
|
||||
|
||||
if (cellValue === null || cellValue === undefined) return "";
|
||||
|
||||
Reference in New Issue
Block a user