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).