diff options
| author | joonhoekim <26rote@gmail.com> | 2025-10-10 11:45:21 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-10-10 11:45:21 +0900 |
| commit | 631b09172b48ec24c4f0131bc97017b87ddf0c47 (patch) | |
| tree | 3375cce9de1662aedf42b29158118baf79e93007 /components/data-table/infinite-data-table.tsx | |
| parent | 9eec700c9627d91aaf52a89d1bfb0ae0e21eb49a (diff) | |
(김준회) fix: data-table 공통컴포넌트의 nested columns에 대한 child column의 width 오류 수정
Diffstat (limited to 'components/data-table/infinite-data-table.tsx')
| -rw-r--r-- | components/data-table/infinite-data-table.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/data-table/infinite-data-table.tsx b/components/data-table/infinite-data-table.tsx index b8764d62..d766f35c 100644 --- a/components/data-table/infinite-data-table.tsx +++ b/components/data-table/infinite-data-table.tsx @@ -167,7 +167,9 @@ export function InfiniteDataTable<TData>({ className={compactStyles.header} style={{ ...getPinnedStyle(header.column, true), // 🎯 헤더임을 명시 - width: header.getSize(), // 🎯 width 별도 설정 + // 부모 그룹 헤더는 colSpan으로 너비가 결정되므로 width 설정하지 않음 + // 자식 헤더만 개별 width 설정 + ...(!('columns' in header.column.columnDef) && { width: header.getSize() }), }} > <div style={{ position: "relative" }}> @@ -178,7 +180,8 @@ export function InfiniteDataTable<TData>({ header.getContext() )} - {header.column.getCanResize() && ( + {/* 부모 그룹 헤더는 리사이즈 불가, 자식 헤더만 리사이즈 가능 */} + {header.column.getCanResize() && !('columns' in header.column.columnDef) && ( <DataTableResizer header={header} /> )} </div> |
