Back to Refine

README

packages/react-table/README.md

3.25.03.7 KB
Original Source
<div align="center" style="margin: 30px;"> <a href="https://refine.dev">
</a>
</div> <div align="center"> <a href="https://refine.dev">Home Page</a> | <a href="https://discord.gg/refine">Discord</a> | <a href="https://refine.dev/examples/">Examples</a> | <a href="https://refine.dev/blog/">Blog</a> | <a href="https://refine.dev/docs/">Documentation</a>

<a href="https://www.producthunt.com/posts/refine-3?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-refine&#0045;3" target="_blank"></a>

</div> <div align="center">refine is an open-source, headless React framework for developers building enterprise internal tools, admin panels, dashboards, B2B applications.

It eliminates repetitive tasks in CRUD operations and provides industry-standard solutions for critical project components like authentication, access control, routing, networking, state management, and i18n.

</div>

Tanstack React Table integration for refine

Tanstack React Table is a headless table library, which means it does not ship with components, markup or styles

refine is headless by design, offering unlimited styling and customization options. Moreover, refine ships with ready-made integrations for Ant Design, Material UI, Mantine, and Chakra UI for convenience.

refine has connectors for 15+ backend services, including REST API, GraphQL, and popular services like Airtable, Strapi, Supabase, Firebase, and NestJS.

Installation & Usage

npm install @refinedev/react-table @tanstack/react-table
tsx
import { useTable } from "@refinedev/react-table";

import { ColumnDef, flexRender } from "@tanstack/react-table";

const EditPost = () => {
  const columns =
    React.useMemo <
    ColumnDef <
    IPost >
    [] >
    (() => [
      {
        id: "id",
        header: "ID",
        accessorKey: "id",
      },
      {
        id: "title",
        header: "Title",
        accessorKey: "title",
        meta: {
          filterOperator: "contains",
        },
      },
    ],
    []);

  const tableInstance = useTable({
    columns,
    refineCoreProps: {
      resource: "posts",
    },
  });

  return; /* ... */
};

Documentation