Lazy loading is useful when you are dealing with large hierarchical data sources
and would like to avoid the delays involved in loading the entire data set at once.
The TreeView control makes lazy-loading super easy. Only one step is required:
Set the "lazy-load-action-url" attribute to a url where you can get the lazy nodes data.
If the child node has children, you can set an empty array to the field which name is what the "child-items-path" attribute stands for.
Otherwise, let it to be null.
when the user expands the node. This function takes two parameters: the parent node
and a callback function to be invoked when the data becomes available.
The tree in example below starts with three lazy-loaded nodes.
When you expand them, the lazy-load-function is invoked. The function
uses a setTimeout to simulate an http delay and returns data for three child nodes,
one of which is also a lazy-loaded node.
The example also uses some CSS to animate the node icons while they are being