Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix table – make pagination optional, remove last row border

Steven Teye3c2051e8f09
diff --git a/packages/ui/src/table/table.tsx b/packages/ui/src/table/table.tsx
index d2971a05b7..d4137bbf2d 100644
--- a/packages/ui/src/table/table.tsx
+++ b/packages/ui/src/table/table.tsx
@@ -62,7 +62,7 @@ type UseTableProps<T> = {
tdClassName?: string | ((columnId: string) => string);
} & (
| {
- pagination: PaginationState;
+ pagination?: PaginationState;
onPaginationChange?: Dispatch<SetStateAction<PaginationState>>;
rowCount: number;
}
@@ -265,6 +265,8 @@ export function Table<T>({
className={cn(
"group/row",
onRowClick && "cursor-pointer select-none",
+ row.index === table.getRowModel().rows.length - 1 && // last row in table shouldn't have a bottom border
+ "[&_td]:border-b-0",
)}
onClick={
onRowClick