From 631b09172b48ec24c4f0131bc97017b87ddf0c47 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Fri, 10 Oct 2025 11:45:21 +0900
Subject: (김준회) fix: data-table 공통컴포넌트의 nested columns에 대한 child
 column의 width 오류 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/data-table/data-table-resizer.tsx | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'components/data-table/data-table-resizer.tsx')

diff --git a/components/data-table/data-table-resizer.tsx b/components/data-table/data-table-resizer.tsx
index 9723a0b4..8053606d 100644
--- a/components/data-table/data-table-resizer.tsx
+++ b/components/data-table/data-table-resizer.tsx
@@ -18,9 +18,10 @@ export function DataTableResizer<TData, TValue>({
   
   // 더블클릭 시 너비 자동 조정 함수
   const handleDoubleClick = React.useCallback(() => {
+
     // 테이블 인스턴스 가져오기
     const table = header.getContext().table
-    
+
     // 0. 몇 가지 기본 설정
     const defaultMinWidth = 80 // 기본 최소 너비
     const extraPadding = 24 // 여유 공간
@@ -75,15 +76,20 @@ export function DataTableResizer<TData, TValue>({
     table.setColumnSizing(updatedSizing)
   }, [header])
 
+  const handleMouseDown = React.useCallback((e: React.MouseEvent) => {
+    // 기본 resize handler 사용
+    header.getResizeHandler()(e);
+  }, [header]);
+
   return (
     <>
       {/* 헤더 콘텐츠 참조를 위한 요소 */}
       <div ref={contentRef} className="absolute opacity-0 pointer-events-none" />
-      
+
       {/* 리사이저 */}
       <div
         {...props}
-        onMouseDown={header.getResizeHandler()}
+        onMouseDown={handleMouseDown}
         onTouchStart={header.getResizeHandler()}
         onDoubleClick={handleDoubleClick} // 더블클릭 핸들러 추가
         className={cn(
-- 
cgit v1.2.3

