@proofgeist/mantine-tanstack-table
TypeScript icon, indicating that this package has built-in type declarations

2.2.10 • Public • Published

mantine-tanstack-table

An opinionated table component with default styling for Mantine 7 and TanStack Table 8.

Initialize the useReactTable hook and pass it into this component to get a fully functional table with sorting, filtering, pagination, and more.

Installation

pnpm i @proofgeist/mantine-tanstack-table

Requires @tanstack/react-table and @mantine/core as peer dependencies.

pnpm install dayjs @mantine/dates

Basic Example (minimal)

import TanstackTable from "@proofgeist/mantine-tanstack-table";
import {
  useReactTable,
  getCoreRowModel,
  createColumnHelper,
} from "@tanstack/react-table";

// this CSS only needs to be imported once in your entire app
// and can be ignored if you want to use your own styles
import "@proofgeist/mantine-tanstack-table/styles.css";

type TData = { name: string };
const columnHelper = createColumnHelper<TData>();

// define your columns outside of your component to avoid re-renders
// or within a useMemo hook if needed to be inside the component
const columns = [columnHelper.accessor("name", { header: "Name" })];

function MyComponent() {
  const table = useReactTable({
    data: [], // add your data here
    columns,
    getCoreRowModel: getCoreRowModel(),
  });
  return <TanstackTable table={table} />;
}

More examples to come

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.2.105latest

Version History

VersionDownloads (Last 7 Days)Published
2.2.105
2.2.90
2.2.80
2.2.70
2.2.60
2.2.50
2.2.40
2.2.30
2.2.20
2.2.10
2.2.00
2.1.90
2.1.80
2.1.70
2.1.60
2.1.50
2.1.40
2.1.30
2.1.20
2.1.10
2.0.40
2.0.30
2.0.20
2.0.10
2.0.00
1.0.00

Package Sidebar

Install

npm i @proofgeist/mantine-tanstack-table

Weekly Downloads

4

Version

2.2.10

License

MIT

Unpacked Size

2.12 MB

Total Files

20

Last publish

Collaborators

  • kyleduval7
  • eluce3
  • toddgeist