New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@proofgeist/mantine-tanstack-table

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@proofgeist/mantine-tanstack-table

An opinionated table component with default styling for [Mantine 7](https://mantine.dev/) and [TanStack Table 8](https://tanstack.com/table/v8).

latest
Source
npmnpm
Version
2.2.10
Version published
Weekly downloads
14
-50%
Maintainers
0
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 25 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts