ResourceTree
Hierarchical tree navigator.
On this page
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label required | string | None | Tree label |
branch required | ResourceTreeBranchProps | None | Root branch definition |
selectedPath | string | None | Currently selected path |
stateKey | string | None | Persistence key for selection state |
searchPlaceholder | string | None | Search input placeholder |
Example
ts
ResourceTree({
label: "Explorer",
branch: {
source: tree(),
nameField: "name",
rowLink: { path: "/item/:id", params: { id: "id" } },
children: { source: children(), nameField: "name" },
},
})Supporting types
ResourceTreeBranchProps
export interface ResourceTreeBranchProps {
source: DataSource;
nameField?: string;
typeField?: string;
rowLink?: TableRowLink;
children?: ResourceTreeBranchProps;
}ResourceTreeBranchDocument
export interface ResourceTreeBranchDocument {
source: ResourceReference;
nameField?: string;
typeField?: string;
rowLink?: PageTableRowLink;
children?: ResourceTreeBranchDocument;
}