Esc
Documentation
On this page

Props

PropTypeDefaultDescription
label requiredstringNoneTree label
branch requiredResourceTreeBranchPropsNoneRoot branch definition
selectedPathstringNoneCurrently selected path
stateKeystringNonePersistence key for selection state
searchPlaceholderstringNoneSearch 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;
}

View the source on GitHub