diff options
Diffstat (limited to 'components/client-data-table')
| -rw-r--r-- | components/client-data-table/data-table.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/components/client-data-table/data-table.tsx b/components/client-data-table/data-table.tsx index 9ea44775..44168bd2 100644 --- a/components/client-data-table/data-table.tsx +++ b/components/client-data-table/data-table.tsx @@ -203,7 +203,8 @@ export function ClientDataTable<TData, TValue>({ onScroll={handleScroll} // ๐ฏ ์คํฌ๋กค ์ด๋ฒคํธ ํธ๋ค๋ฌ ์ถ๊ฐ > <UiTable - className="[&>thead]:sticky [&>thead]:top-0 [&>thead]:z-10 table-fixed"> + className="[&>thead]:sticky [&>thead]:top-0 [&>thead]:z-10"> + {/* table-fixed ์ ๊ฑฐ: nested header์์ ๋์ width ๋ณ๊ฒฝ์ ์ํด ์ ์ฐํ ๋ ์ด์์ ์ฌ์ฉ */} <TableHeader> {table.getHeaderGroups().map((headerGroup) => ( <TableRow key={headerGroup.id} className={compactStyles.headerRow}> @@ -221,7 +222,9 @@ export function ClientDataTable<TData, TValue>({ 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" }}> @@ -232,8 +235,8 @@ export function ClientDataTable<TData, TValue>({ header.getContext() )} - {/* ๋ฆฌ์ฌ์ด์ฆ ํธ๋ค - ํค๋์๋ง ์ถ๊ฐ */} - {header.column.getCanResize() && ( + {/* ๋ถ๋ชจ ๊ทธ๋ฃน ํค๋๋ ๋ฆฌ์ฌ์ด์ฆ ๋ถ๊ฐ, ์์ ํค๋๋ง ๋ฆฌ์ฌ์ด์ฆ ๊ฐ๋ฅ */} + {header.column.getCanResize() && !('columns' in header.column.columnDef) && ( <DataTableResizer header={header} /> )} </div> |
