tanstack-table-guide

Implement TanStack Table data tables with sorting, filtering, pagination, and row selection in React.

3|Updated Apr 5, 2024
One-click install
npx skills add https://github.com/danghungtb26/admin-react-typescript-template --skill tanstack-table-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-table-guide
Source: https://github.com/danghungtb26/admin-react-typescript-template/tree/main/.agents/skills/tanstack-table-guide
Command: npx skills add https://github.com/danghungtb26/admin-react-typescript-template --skill tanstack-table-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps developers implement robust TanStack Table data tables in React, enabling scalable, customizable grid interfaces with predictable state management.

Core Features & Use Cases

  • Headless core: TanStack Table provides the logic and state management, leaving UI rendering to you.
  • Comprehensive features: Sorting, filtering, pagination, and row selection for both client-side and server-side data.
  • Real-world scenarios: Dashboards, admin panels, and data-heavy grids where fast interactions and precise control are required.

Quick Start

Install the required library and scaffold a basic table:

  • Install: pnpm add @tanstack/react-table
  • Define data and ColumnDef types, create a table with useReactTable, and render a semantic HTML table.
  • Expand with sorting, filtering, and pagination using the provided API (getSortedRowModel, getFilteredRowModel, getPaginationRowModel).

Frequently Asked Questions about tanstack-table-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement sorting and filtering in a React data table?

You can add pagination to a TanStack Table by utilizing the getPaginationRowModel API, which handles data chunking for both client-side rendering and server-side data fetching in admin panels.

Does TanStack Table support server-side data fetching for dashboards?

TanStack Table supports server-side data fetching for dashboards by managing table state externally, allowing you to orchestrate remote sorting, filtering, and pagination for scalable admin applications.

How do I set up row selection in a React data table?

You can add pagination to a TanStack Table by utilizing the getPaginationRowModel API, which handles data chunking for both client-side rendering and server-side data fetching in admin panels.

What is a headless React table and how does it work?

You can add pagination to a TanStack Table by utilizing the getPaginationRowModel API, which handles data chunking for both client-side rendering and server-side data fetching in admin panels.

Do I need TypeScript to use TanStack Table for data grids?

You can add pagination to a TanStack Table by utilizing the getPaginationRowModel API, which handles data chunking for both client-side rendering and server-side data fetching in admin panels.

What's the best way to manage state in a React data table?

You can add pagination to a TanStack Table by utilizing the getPaginationRowModel API, which handles data chunking for both client-side rendering and server-side data fetching in admin panels.