row-pinning

Pin user-specified rows to top or bottom regions in TanStack Table.

28.3k|3.6k|Updated Oct 20, 2016
One-click install
npx skills add https://github.com/TanStack/table --skill row-pinning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: row-pinning
Source: https://github.com/TanStack/table/tree/main/packages/table-core/skills/row-pinning
Command: npx skills add https://github.com/TanStack/table --skill row-pinning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pinning specific rows to the top or bottom solves the problem of keeping key records visible while users sort, filter, or paginate a TanStack Table datagrid.

Core Features & Use Cases

  • Top/bottom row pinning: Pin row IDs into a persistent top or bottom region and retrieve them via top/center/bottom row getters.
  • Row-level control: Use row.pin() to pin/unpin and row.getIsPinned()-style APIs to drive UI state (buttons, indicators, and permissions).
  • Pipeline-aware rendering: Use separate rendering for pinned regions to avoid duplicated rows and keep the main flow focused on center rows.
  • UX persistence tuning: Choose whether pinned rows remain visible across pagination/filtering via keepPinnedRows (default) or disappear when filtered/paginated out.
  • Grouped/expanded support: Pin parent/leaf row groups with include flags so hierarchical data stays coherent.

Quick Start

Tell the AI coding agent to implement row pinning in a TanStack Table v9 setup by adding the row pinning feature, defining a stable getRowId, rendering pinned regions using getTopRows() and getBottomRows(), and wiring pin/unpin buttons to row.pin('top') and row.pin(false).

Frequently Asked Questions about row-pinning

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

FAQPage Schema
How do I pin rows to the top or bottom of a TanStack Table datagrid?

To pin rows in TanStack Table, add the row pinning feature, define a stable row identity via getRowId, and use row.pin('top') or row.pin('bottom') to keep records visible while sorting, filtering, or paginating.

Do pinned rows stay visible when filtering or paginating a TanStack Table?

By default, pinned rows stay visible across pagination and filtering using the keepPinnedRows option. You can disable this behavior to let pinned rows disappear when they are filtered or paginated out of the main datagrid view.

Why do I need a stable row identity for row pinning in TanStack Table?

A stable row identity via getRowId is required for row pinning because the feature tracks pinned records by their unique IDs. Without stable identifiers, sorting or filtering operations would break the association between pinned rows and their data.

Can I pin grouped or expanded parent rows in a TanStack Table datagrid?

Yes, TanStack Table row pinning supports grouped and expanded rows by using include flags. This ensures hierarchical data stays coherent when pinning parent or leaf row groups to the top or bottom regions of the datagrid.

How do I render pinned rows separately in TanStack Table to avoid duplication?

Use getTopRows() and getBottomRows() to render pinned regions separately from the main flow. This pipeline-aware rendering retrieves center rows via getCenterRows() to avoid duplicated rows and keeps the datagrid display focused.