From 08ad2abdd1b41466cd21a2e3bd6241bf60c429c9 Mon Sep 17 00:00:00 2001 From: kmh Date: Wed, 18 Mar 2026 16:25:13 +0900 Subject: [PATCH] refactor: improve SplitPanelLayoutComponent for better responsiveness and layout handling - Removed unnecessary div wrappers to streamline the layout structure. - Adjusted table minimum width calculations to ensure better responsiveness across different screen sizes. - Enhanced column width handling to provide a more consistent and flexible user experience. These changes aim to refine the overall layout and usability of the SplitPanelLayoutComponent, ensuring it adapts more effectively to varying content and screen dimensions. --- .../SplitPanelLayoutComponent.tsx | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/frontend/lib/registry/components/v2-split-panel-layout/SplitPanelLayoutComponent.tsx b/frontend/lib/registry/components/v2-split-panel-layout/SplitPanelLayoutComponent.tsx index aa293ce6..254255af 100644 --- a/frontend/lib/registry/components/v2-split-panel-layout/SplitPanelLayoutComponent.tsx +++ b/frontend/lib/registry/components/v2-split-panel-layout/SplitPanelLayoutComponent.tsx @@ -3896,13 +3896,13 @@ export const SplitPanelLayoutComponent: React.FC const canDragLeftGroupedColumns = !isDesignMode && columnsToShow.length > 1; if (groupedLeftData.length > 0) { return ( -
+ <> {groupedLeftData.map((group, groupIdx) => (
{group.groupKey} ({group.count}개)
- +
{columnsToShow.map((col, idx) => { @@ -4016,7 +4016,7 @@ export const SplitPanelLayoutComponent: React.FC
))} -
+ ); } @@ -4027,8 +4027,7 @@ export const SplitPanelLayoutComponent: React.FC componentConfig.leftPanel?.showDelete !== false); const canDragLeftColumns = !isDesignMode && columnsToShow.length > 1; return ( -
- +
{columnsToShow.map((col, idx) => { @@ -4135,7 +4134,6 @@ export const SplitPanelLayoutComponent: React.FC })}
-
); })() )} @@ -5189,19 +5187,13 @@ export const SplitPanelLayoutComponent: React.FC columnsToShow = [...keyCols, ...applyRuntimeOrder(dataCols, "main")]; } - // 컬럼 너비 합계 계산 (작업 컬럼 제외, 100% 초과 시 스크롤) - const rightTotalColWidth = columnsToShow.reduce((sum, col) => { - const w = col.width && col.width <= 100 ? col.width : 0; - return sum + w; - }, 0); - const rightConfigColumnStart = columnsToShow.filter((c: any) => c._isKeyColumn).length; const canDragRightColumns = displayColumns.length > 0; return (
- +
{columnsToShow.map((col, idx) => { @@ -5221,7 +5213,7 @@ export const SplitPanelLayoutComponent: React.FC isDragging && "opacity-50", )} style={{ - width: col.width && col.width <= 100 ? `${col.width}%` : "auto", + minWidth: col.width ? `${col.width}px` : "80px", textAlign: col.align || "left", }} draggable={isDraggable} @@ -5387,14 +5379,14 @@ export const SplitPanelLayoutComponent: React.FC return filteredData.length > 0 ? (
-
+
{columnsToDisplay.map((col) => (
{col.label}