What problem does it solve?
This Skill helps you add reliable row expansion to TanStack Table so users can drill into hierarchical sub-rows or reveal per-row detail panels without losing control over markup and behavior.
Core Features & Use Cases
- Tree sub-rows via expandedRowModel: Support nested datasets using
getSubRows, with state-driven expansion using state.expanded and onExpandedChange.
- Detail panels for flat data: Expand individual rows to render an additional UI section (e.g., an info panel) using
getRowCanExpand and row.getIsExpanded().
- Pagination and filtering interactions: Control whether expanded children participate in paging via
paginateExpandedRows and ensure parent visibility during tree filtering via filterFromLeafRows and maxLeafRowFilterDepth.
Quick Start
Use the row-expanding Skill to configure rowExpandingFeature with createExpandedRowModel(), register either getSubRows (tree mode) or getRowCanExpand (detail-panel mode), then render an expander that calls row.getToggleExpandedHandler() and conditionally displays expanded children or a sub-component.