Blazorise TreeView component
No documentation available - no XML comment
API
Parameters
| Parameter | Description | Type | Default |
|---|---|---|---|
AutoExpandAll |
Specifies if the treenode should be automatically expanded. Note that it can happen only once when the tree is first loaded. |
bool | false |
ChildContent |
Specifies the content to be rendered inside this TreeView. |
RenderFragment | null |
CollapseIconName |
Specifies the name of the treenode collapse icon. |
IconName | ChevronDown |
CollapseIconSize |
Specifies the size of the treenode collapse icon. |
IconSize? | null |
CollapseIconStyle |
Specifies the style of the treenode collapse icon. |
IconStyle? | null |
ExpandedNodes |
List of currently expanded TreeView items (child nodes). |
IList<TNode> | new List<TNode>() |
ExpandIconName |
Specifies the name of the treenode expand icon. |
IconName | ChevronRight |
ExpandIconSize |
Specifies the size of the treenode expand icon. |
IconSize? | null |
ExpandIconStyle |
Specifies the style of the treenode expand icon. |
IconStyle? | null |
NodeContent |
Template to display content for the node |
RenderFragment<TNode> | null |
NodeContextMenuPreventDefault |
Used to prevent the default action for a NodeContextMenu event. |
bool | false |
Nodes |
Collection of child TreeView items (child nodes) |
IEnumerable<TNode> | null |
SelectedNode |
Currently selected TreeView item/node. |
TNode | null |
SelectedNodes |
Currently selected TreeView items/nodes. |
IList<TNode> | null |
SelectionMode |
Specifies the selection mode of the TreeView. Possible values: |
TreeViewSelectionMode | TreeViewSelectionMode.Single |
Virtualize |
Controls if the child nodes, which are currently not expanded, are visible. This is useful for optimizing large TreeViews. See Docs for virtualization for more info. |
bool | false |
Events
| Event | Description | Type |
|---|---|---|
DisabledNodeStyling |
Defines styling applied to disabled nodes. |
Action<TNode, NodeStyling> |
ExpandedNodesChanged |
Notifies when the collection of expanded nodes has changed. |
EventCallback<IList<TNode>> |
GetChildNodes |
Gets the list of child nodes for each node. |
Func<TNode, IEnumerable<TNode>> |
GetChildNodesAsync |
Gets the list of child nodes for each node. |
Func<TNode, Task<IEnumerable<TNode>>> |
HasChildNodes |
Indicates if the node has child elements. |
Func<TNode, bool> |
HasChildNodesAsync |
Indicates if the node has child elements. |
Func<TNode, Task<bool>> |
IsDisabled |
Indicates the node's disabled state. Used for preventing selection. |
Func<TNode, bool> |
NodeContextMenu |
The event is fired when the node is right clicked to show the context menu. |
EventCallback<TreeViewNodeMouseEventArgs<TNode>> |
NodeStyling |
Defines styling applied to nodes. |
Action<TNode, NodeStyling> |
SelectedNodeChanged |
Notifies when the selected TreeView node has changed. |
EventCallback<TNode> |
SelectedNodesChanged |
Notifies when the selected TreeView nodes has changed. |
EventCallback<IList<TNode>> |
SelectedNodeStyling |
Defines styling applied to selected nodes. |
Action<TNode, NodeStyling> |
Methods
| Method | Description | Return | Parameters |
|---|---|---|---|
CollapseAll |
Collapses all the expanded TreeView nodes. | Task | |
ExpandAll |
Expands all the collapsed TreeView nodes. | Task | |
Reload |
Triggers the reload of the Nodes. | Task | |
RemoveNode |
Attempts to find and remove an existing node from the Treeview. | Task | TNode node |
SelectNode |
Selects the node when in single selection mode. | void | TNode node |
ToggleCheckNode |
Toggles the checked state of the node when in multiple selection mode. | Task | TNode node |