Examples
Expanding Tree Example
A Shadcn Table example demonstrating expandable sub-rows in a tree structure
Shadcn Table supports showing rows in a expanding tree structure. This example is the simplest implementation of this feature where each row of data potentially has a special subRows property that contains an array of sub rows. You don't have to follow this exact structure, but this is how ST will expect to find your sub rows by default.
Learn more about how to customize this in the expanding sub-rows feature guide.
Try it
- Click the arrow on Dylan Murray. His sub-rows hide.
- Open search and type
Jordan. Matching sub-rows show with their parent rows.
Related guides
Aggregation and Grouping Example
A Shadcn Table example demonstrating aggregation and grouping. See how you can group rows by a column and aggregate the values of other columns.
Expanding Parsed Tree Example
A Shadcn Table example demonstrating expandable sub-rows in a tree structure parsed from a flat list of data