import type { Table } from "@tanstack/react-table"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "~/components/ui/select"; import { Button } from "~/components/ui/button"; import { ChevronFirst, ChevronLast, ChevronLeftIcon, ChevronRightIcon, } from "lucide-react"; interface DataTablePaginationProps { table: Table; hasSelectRow?: boolean; } export function DataTablePagination({ table, hasSelectRow, }: DataTablePaginationProps) { return (
{hasSelectRow && ( <> {table.getFilteredSelectedRowModel().rows.length} di{" "} {table.getFilteredRowModel().rows.length} righe selezionate. )}

Righe per pagina

Pagina {table.getState().pagination.pageIndex + 1} di{" "} {table.getPageCount()}
); }