fix: 분할 패널 우측 테이블 설정에서 화면에 표시되는 컬럼만 보이도록 수정
문제: - 분할 패널의 테이블 옵션/검색필터 설정/그룹 설정에서 모든 컬럼이 표시됨 - 우측 패널에서 rightTableColumns (전체 컬럼) 사용하여 등록 해결: - componentConfig.rightPanel?.columns (화면 표시 컬럼)만 등록하도록 수정 - 좌측 패널과 동일한 방식으로 displayColumns 사용 - 의존성 배열도 rightTableColumns → rightPanel.columns로 수정 변경 사항: - rightTableColumns 대신 displayColumns 사용 - 컬럼 매핑 로직 개선 (col.columnName || col.name || col) - 화면에 실제 표시되는 컬럼만 설정 UI에 노출
This commit is contained in:
parent
e06f21f63f
commit
c40d8ea1ba
|
|
@ -320,7 +320,9 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
|
||||||
if (!rightTableName || isDesignMode) return;
|
if (!rightTableName || isDesignMode) return;
|
||||||
|
|
||||||
const rightTableId = `split-panel-right-${component.id}`;
|
const rightTableId = `split-panel-right-${component.id}`;
|
||||||
const rightColumns = rightTableColumns.map((col: any) => col.columnName || col.column_name).filter(Boolean);
|
// 🔧 화면에 표시되는 컬럼만 등록 (displayColumns 또는 columns)
|
||||||
|
const displayColumns = componentConfig.rightPanel?.columns || [];
|
||||||
|
const rightColumns = displayColumns.map((col: any) => col.columnName || col.name || col).filter(Boolean);
|
||||||
|
|
||||||
if (rightColumns.length > 0) {
|
if (rightColumns.length > 0) {
|
||||||
registerTable({
|
registerTable({
|
||||||
|
|
@ -343,7 +345,7 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
|
||||||
|
|
||||||
return () => unregisterTable(rightTableId);
|
return () => unregisterTable(rightTableId);
|
||||||
}
|
}
|
||||||
}, [component.id, componentConfig.rightPanel?.tableName, rightTableColumns, rightColumnLabels, component.title, isDesignMode]);
|
}, [component.id, componentConfig.rightPanel?.tableName, componentConfig.rightPanel?.columns, rightColumnLabels, component.title, isDesignMode]);
|
||||||
|
|
||||||
// 좌측 테이블 컬럼 라벨 로드
|
// 좌측 테이블 컬럼 라벨 로드
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue