summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/data-table/data-table-pagination.tsx1
-rw-r--r--components/data-table/data-table-pin-left.tsx1
-rw-r--r--components/data-table/data-table-pin-right.tsx1
-rw-r--r--components/data-table/data-table-view-options.tsx1
-rw-r--r--components/data-table/data-table.tsx5
5 files changed, 4 insertions, 5 deletions
diff --git a/components/data-table/data-table-pagination.tsx b/components/data-table/data-table-pagination.tsx
index 7a2a03f8..4ed63a1b 100644
--- a/components/data-table/data-table-pagination.tsx
+++ b/components/data-table/data-table-pagination.tsx
@@ -42,6 +42,7 @@ export function DataTablePagination<TData>({
<div className="flex-1 whitespace-nowrap text-sm text-muted-foreground">
{table.getFilteredSelectedRowModel().rows.length} of{" "}
{table.getFilteredRowModel().rows.length} row(s) selected.
+ <span className="ml-4">Total: {table.getRowCount()} records</span>
</div>
<div className="flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8">
{/* Rows per page Select */}
diff --git a/components/data-table/data-table-pin-left.tsx b/components/data-table/data-table-pin-left.tsx
index e79e01eb..27116774 100644
--- a/components/data-table/data-table-pin-left.tsx
+++ b/components/data-table/data-table-pin-left.tsx
@@ -182,7 +182,6 @@ export function PinLeftButton<TData>({ table }: { table: Table<TData> }) {
<span className="hidden sm:inline">
왼쪽 고정
</span>
- <ChevronsUpDown className="ml-1 size-4 opacity-50 hidden sm:inline" />
</Button>
</PopoverTrigger>
diff --git a/components/data-table/data-table-pin-right.tsx b/components/data-table/data-table-pin-right.tsx
index ad52e44d..2ba471cc 100644
--- a/components/data-table/data-table-pin-right.tsx
+++ b/components/data-table/data-table-pin-right.tsx
@@ -181,7 +181,6 @@ export function PinRightButton<TData>({ table }: { table: Table<TData> }) {
<span className="hidden sm:inline">
오른 고정
</span>
- <ChevronsUpDown className="ml-1 size-4 opacity-50 hidden sm:inline" />
</Button>
</PopoverTrigger>
diff --git a/components/data-table/data-table-view-options.tsx b/components/data-table/data-table-view-options.tsx
index 69666237..50bb50dd 100644
--- a/components/data-table/data-table-view-options.tsx
+++ b/components/data-table/data-table-view-options.tsx
@@ -129,7 +129,6 @@ export function DataTableViewOptions<TData>({
>
<Settings2 className="size-4" />
<span className="hidden sm:inline">보기</span>
- <ChevronsUpDown className="ml-auto size-4 shrink-0 opacity-50 hidden sm:inline" />
</Button>
</PopoverTrigger>
diff --git a/components/data-table/data-table.tsx b/components/data-table/data-table.tsx
index 5aeefe21..c241c1ec 100644
--- a/components/data-table/data-table.tsx
+++ b/components/data-table/data-table.tsx
@@ -35,8 +35,9 @@ export function DataTable<TData>({
compact = false, // 기본값은 false로 설정
children,
className,
+ maxHeight,
...props
-}: DataTableProps<TData>) {
+}: DataTableProps<TData> & { maxHeight?: string | number }) {
useAutoSizeColumns(table, autoSizeColumns)
@@ -56,7 +57,7 @@ export function DataTable<TData>({
return (
<div className={cn("w-full space-y-2.5 overflow-auto", className)} {...props}>
{children}
- <div className="max-w-[100vw] overflow-auto" style={{ maxHeight: '35rem' }}>
+ <div className="max-w-[100vw] overflow-auto" style={{ maxHeight: maxHeight || '35rem' }} >
<Table className="[&>thead]:sticky [&>thead]:top-0 [&>thead]:z-10 table-fixed">
{/* 테이블 헤더 */}
<TableHeader>