From 9cf9b87068eb6341018e0dbe8e198ff76a70b578 Mon Sep 17 00:00:00 2001 From: kjs Date: Wed, 12 Nov 2025 15:54:48 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=B6=84=ED=95=A0=20=ED=8C=A8?= =?UTF-8?q?=EB=84=90=EC=97=90=EC=84=9C=20=EC=A2=8C=EC=B8=A1=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=EB=A7=8C=20=EA=B2=80=EC=83=89=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=93=B1=EB=A1=9D=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 변경 사유: - 분할 패널은 마스터-디테일 구조로 좌측(마스터)만 독립적으로 검색 가능 - 우측(디테일)은 좌측 선택 항목에 종속되므로 별도 검색 불필요 변경 내용: - 우측 테이블 registerTable 호출 제거 (주석 처리) - TableSearchWidget에서 좌측 테이블만 선택 가능 - 우측 테이블 관련 상태(rightFilters, rightGrouping 등)는 내부 로직용으로 유지 효과: - 분할 패널 사용 시 좌측 마스터 테이블만 검색 설정 가능 - 우측 디테일 테이블은 좌측 선택에 따라 자동 필터링 - 검색 컴포넌트 UI가 더 직관적으로 개선 --- .../SplitPanelLayoutComponent.tsx | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/frontend/lib/registry/components/split-panel-layout/SplitPanelLayoutComponent.tsx b/frontend/lib/registry/components/split-panel-layout/SplitPanelLayoutComponent.tsx index b73a1224..809b9035 100644 --- a/frontend/lib/registry/components/split-panel-layout/SplitPanelLayoutComponent.tsx +++ b/frontend/lib/registry/components/split-panel-layout/SplitPanelLayoutComponent.tsx @@ -314,38 +314,38 @@ export const SplitPanelLayoutComponent: React.FC } }, [component.id, componentConfig.leftPanel?.tableName, componentConfig.leftPanel?.displayColumns, leftColumnLabels, component.title, isDesignMode]); - // 우측 테이블 등록 (Context에 등록) - useEffect(() => { - const rightTableName = componentConfig.rightPanel?.tableName; - if (!rightTableName || isDesignMode) return; - - const rightTableId = `split-panel-right-${component.id}`; - // 🔧 화면에 표시되는 컬럼만 등록 (displayColumns 또는 columns) - const displayColumns = componentConfig.rightPanel?.columns || []; - const rightColumns = displayColumns.map((col: any) => col.columnName || col.name || col).filter(Boolean); - - if (rightColumns.length > 0) { - registerTable({ - tableId: rightTableId, - label: `${component.title || "분할 패널"} (우측)`, - tableName: rightTableName, - columns: rightColumns.map((col: string) => ({ - columnName: col, - columnLabel: rightColumnLabels[col] || col, - inputType: "text", - visible: true, - width: 150, - sortable: true, - filterable: true, - })), - onFilterChange: setRightFilters, - onGroupChange: setRightGrouping, - onColumnVisibilityChange: setRightColumnVisibility, - }); - - return () => unregisterTable(rightTableId); - } - }, [component.id, componentConfig.rightPanel?.tableName, componentConfig.rightPanel?.columns, rightColumnLabels, component.title, isDesignMode]); + // 우측 테이블은 검색 컴포넌트 등록 제외 (좌측 마스터 테이블만 검색 가능) + // useEffect(() => { + // const rightTableName = componentConfig.rightPanel?.tableName; + // if (!rightTableName || isDesignMode) return; + // + // const rightTableId = `split-panel-right-${component.id}`; + // // 🔧 화면에 표시되는 컬럼만 등록 (displayColumns 또는 columns) + // const displayColumns = componentConfig.rightPanel?.columns || []; + // const rightColumns = displayColumns.map((col: any) => col.columnName || col.name || col).filter(Boolean); + // + // if (rightColumns.length > 0) { + // registerTable({ + // tableId: rightTableId, + // label: `${component.title || "분할 패널"} (우측)`, + // tableName: rightTableName, + // columns: rightColumns.map((col: string) => ({ + // columnName: col, + // columnLabel: rightColumnLabels[col] || col, + // inputType: "text", + // visible: true, + // width: 150, + // sortable: true, + // filterable: true, + // })), + // onFilterChange: setRightFilters, + // onGroupChange: setRightGrouping, + // onColumnVisibilityChange: setRightColumnVisibility, + // }); + // + // return () => unregisterTable(rightTableId); + // } + // }, [component.id, componentConfig.rightPanel?.tableName, componentConfig.rightPanel?.columns, rightColumnLabels, component.title, isDesignMode]); // 좌측 테이블 컬럼 라벨 로드 useEffect(() => {