LyteNyte Grid logo for light mode. Links back to the documentation home page.
Tree Data

Tree Row Pinning

Pin rows to the top or bottom of the viewport while using the tree data source. Pinned rows remain visible as users scroll through hierarchical data.

Note

This guide assumes familiarity with row pinning. Read the Row Pinning guide for more details.

Top Pinned Rows

Pin rows to the top of the viewport by assigning an array of RowLeaf or RowAggregated nodes to the topData property of the useTreeDataSource hook.

The demo below shows a tree data source with rows pinned to the top.

Tree Data Top Pinned Rows

Fork code on stack blitzFork code on code sandbox

Bottom Pinned Rows

Pin rows to the bottom of the viewport by assigning an array of RowLeaf or RowAggregated nodes to the botData property. Rows assigned to botData remain fixed at the bottom edge while the rest of the tree scrolls.

The demo below shows a tree data source with rows pinned to the bottom.

Tree Data Bottom Pinned Rows

Fork code on stack blitzFork code on code sandbox

Next Steps

  • Row Pinning: Freeze rows at the top or bottom of the viewport.
  • Tree Data: Generate hierarchical rows from nested object data.
  • Tree Sorting: Sort tree rows in ascending or descending order.