// MUI Imports import Pagination from '@mui/material/Pagination' import Typography from '@mui/material/Typography' // Third Party Imports import type { useReactTable } from '@tanstack/react-table' const TablePaginationComponent = ({ table }: { table: ReturnType }) => { return (
{`Showing ${ table.getFilteredRowModel().rows.length === 0 ? 0 : table.getState().pagination.pageIndex * table.getState().pagination.pageSize + 1 } to ${Math.min( (table.getState().pagination.pageIndex + 1) * table.getState().pagination.pageSize, table.getFilteredRowModel().rows.length )} of ${table.getFilteredRowModel().rows.length} entries`} { table.setPageIndex(page - 1) }} showFirstButton showLastButton />
) } export default TablePaginationComponent