Skip to content

Function: useLazyTree()

useLazyTree<TRow>(dataSource): UseLazyTreeReturn<TRow>

Defined in: src/data/use-lazy-tree.ts:34

Hook managing lazy child loading for tree data sources.

  • Calls dataSource.loadChildren() when a node is expanded.
  • Deduplicates concurrent requests for the same node.
  • Tracks loading, loaded, and error states per node.
  • Supports retry after failure and invalidation for refresh.

Type Parameters

TRow

TRow

Parameters

dataSource

DataSource<TRow>

Returns

UseLazyTreeReturn<TRow>