Tree Repository
A Tree Repository provides data to populate your Tree. It implements methods to return the root, root items, children of items, and ancestors.
The repository is referenced by your Tree Manifest via meta.repositoryAlias.
Interface
The UmbTreeRepository interface defines the methods your repository must implement:
interface UmbTreeRepository {
requestTreeRoot();
requestTreeRootItems();
requestTreeItemsOf();
requestTreeItemAncestors();
}See the full interface in the UI API Documentation.
Registering the Repository
Register the Repository in your Manifest:
{
type: 'repository',
alias: 'My.Tree.Repository',
name: 'My Tree Repository',
api: () => import('./my-tree.repository.js'),
}Implementing a Tree Repository
Extend UmbControllerBase and implement the UmbTreeRepository interface.
Static Data Example
Related
Tree Models -
UmbTreeItemModelandUmbTreeRootModelinterfaces.Trees & Workspaces - How Tree clicks navigate to Workspaces.
Trees - Main Tree extension documentation.
Last updated
Was this helpful?