OGE logoOGE

Lazy Loading

Hand the tree a DataSource plus hasItemsExpr and children are fetched on demand — one parentId eq key request per expansion, cached until the sort changes or refresh() is called. A skeleton row shows while a level is in flight.

hasItemsExpr DataSource loadMode
350ms fake server per-expansion requests
Name
Title
Office
Requests
  1. parentId eq null

Notes

  • The initial load asks for parentId eq rootValue; an OData backend works without any adapter code ($filter=parentId eq 42).
  • hasItemsExpr decides expandability before children exist locally.
  • Lazy mode needs a string parentIdExpr; a sort change re-requests open levels.
  • loadMode defaults to 'lazy' exactly when a DataSource and hasItemsExpr are both present — set it explicitly to override.