diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-02 02:27:28 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-02 02:27:28 +0000 |
| commit | 37611339fea096e47aaa42311a13a6313b4200db (patch) | |
| tree | dd9c7dba27a3db2aebd18bf2087c6a30987aa957 /lib/data-table.ts | |
| parent | bac0228d21b7195065e9cddcc327ae33659c7bcc (diff) | |
(대표님) 20250602 오전 작업사항 (코드프리징)
Diffstat (limited to 'lib/data-table.ts')
| -rw-r--r-- | lib/data-table.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/data-table.ts b/lib/data-table.ts index 4ad57d76..fd9309ab 100644 --- a/lib/data-table.ts +++ b/lib/data-table.ts @@ -20,9 +20,11 @@ import { FilterFn, Row } from "@tanstack/react-table" export function getCommonPinningStylesWithBorder<TData>({ column, withBorder = true, + isHeader = false, }: { column: Column<TData> withBorder?: boolean + isHeader?: boolean }): React.CSSProperties { const pinnedSide = column.getIsPinned() as "left" | "right" | false @@ -38,8 +40,8 @@ export function getCommonPinningStylesWithBorder<TData>({ /* ▒▒ 기타 스타일 ▒▒ */ width: column.getSize(), - // 불투명한 배경색 설정 - 테이블의 배경색과 동일하게 - background: pinnedSide ? "hsl(var(--background))" : "transparent", + // 헤더는 항상 불투명, 셀은 핀된 경우에만 불투명 + background: isHeader || pinnedSide ? "hsl(var(--background))" : "transparent", zIndex: pinnedSide ? 1 : 0, } |
