expanding
Installation
SKILL.md
This skill builds on core, table-features, and client-vs-server. Expansion controls row-tree inclusion; the renderer owns disclosure controls and detail panels.
Setup
import {
createExpandedRowModel,
rowExpandingFeature,
tableFeatures,
} from '@tanstack/table-core'
type Node = { id: string; children?: Node[] }
export const features = tableFeatures({
rowExpandingFeature,
expandedRowModel: createExpandedRowModel(),
})
export const options = { getSubRows: (row: Node) => row.children }