From 37611339fea096e47aaa42311a13a6313b4200db Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 2 Jun 2025 02:27:28 +0000 Subject: (대표님) 20250602 오전 작업사항 (코드프리징) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/data-table.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/data-table.ts') 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({ column, withBorder = true, + isHeader = false, }: { column: Column withBorder?: boolean + isHeader?: boolean }): React.CSSProperties { const pinnedSide = column.getIsPinned() as "left" | "right" | false @@ -38,8 +40,8 @@ export function getCommonPinningStylesWithBorder({ /* ▒▒ 기타 스타일 ▒▒ */ width: column.getSize(), - // 불투명한 배경색 설정 - 테이블의 배경색과 동일하게 - background: pinnedSide ? "hsl(var(--background))" : "transparent", + // 헤더는 항상 불투명, 셀은 핀된 경우에만 불투명 + background: isHeader || pinnedSide ? "hsl(var(--background))" : "transparent", zIndex: pinnedSide ? 1 : 0, } -- cgit v1.2.3