Skip to main content

@microsoft/fast-foundation > TreeItem

TreeItem class

A Tree item Custom HTML Element.

start - Content which can be provided before the tree item content

end - Content which can be provided after the tree item content

  • The default slot for tree item text content

item - The slot for tree items (fast tree items manage this assignment themselves)

expand-collapse-button - The expand/collapse button

positioning-region - The element used to position the tree item content with exception of any child nodes

content-region - The element containing the expand/collapse, start, and end slots

items - The element wrapping any child items

expand-collapse-button - The expand/collapse button

expanded-change - Fires a custom 'expanded-change' event when the expanded state changes

selected-change - Fires a custom 'selected-change' event when the selected state changes

Signature:
export declare class TreeItem extends FoundationElement 

Properties

PropertyModifiersTypeDescription
disabledbooleanWhen true, the control will be immutable by user interaction. See disabled HTML attribute for more information.
expandedbooleanWhen true, the control will be appear expanded by user interaction.
isNestedItem() => booleanWhether the tree is nested
selectedbooleanWhen true, the control will appear selected by user interaction.

Methods

MethodModifiersDescription
focusItem(el)staticPlaces document focus on a tree item