Lazy-load expand on demand
Live in demo 31-lazy-tree-load.
When
Tree rows where children are fetched only when the user expands their parent.
How
Key API surface:
onExpand callbackmerge children into $state on resolve
See the demo source for the full implementation; this recipe pins the pattern + the surface so you can copy-paste it confidently. The doc page that explains the underlying feature in depth is linked from the recipes index.
See also
- Demo 31-lazy-tree-load source
- Demo 31-lazy-tree-load prompt sidecar - drop into an LLM context window
- Recipes index