MaterialTreeComponent<T> class

A material selection component that supports a tree of options.

To use, simply pass in a minimum of options to see items.

If SelectionOptions implements the Parent interface, a handle is shown for each option that Parent.hasChildren is set for, and toggling the handle will create an additional tree from the results of Parent.childrenOf.

If SelectionOptions implements the Filterable interface.

To receive feedback from the component, a selection model is required.

To customize, specify an itemRenderer and/or factoryRenderer.

Implemented types
Mixed-in types
Annotations
  • @Component(selector: 'material-tree', changeDetection: ChangeDetectionStrategy.onPush, directives: [MaterialTreeGroupComponent, MaterialTreeGroupFlatCheckComponent, MaterialTreeGroupFlatListComponent, MaterialTreeGroupFlatRadioComponent, NgFor, NgIf], directiveTypes: [Typed<MaterialTreeGroupComponent>.of([#T]), Typed<MaterialTreeGroupFlatCheckComponent>.of([#T]), Typed<MaterialTreeGroupFlatListComponent>.of([#T]), Typed<MaterialTreeGroupFlatRadioComponent>.of([#T])], viewProviders: [ExistingProvider(MaterialTreeRoot, MaterialTreeComponent)], templateUrl: 'material_tree_impl.html')

Constructors

MaterialTreeComponent(@Optional() @SkipSelf() MaterialTreeRoot? parentTreeRoot, @Optional() @Self() MaterialTreeRenderingOptions? renderingOptions)

Properties

allowDeselectInHierarchy bool
Whether clicking on a selected item should deselect it. (Only applicable when supportsHierarchy is true.)
getter/setter pair
allowParentMultiSelection bool
Whether the widgets supports the selection of non-leaf nodes.
getter/setter pair
allowParentSingleSelection bool
Whether the widgets supports the selection of non-leaf nodes.
getter/setter pair
expandAll bool
Whether to initially expand an option group.
getter/setter pair
factoryRenderer FactoryRenderer<RendersValue, T>?
Specifies the componentRenderer to use to determine the component for rendering an item. Specifies the factoryRenderer to use to determine the factory for rendering an item.
getter/setter pairinherited-getteroverride-setter
hashCode int
The hash code for this object.
no setterinherited
hostMultiselectable String
no setter
hostReadonly String
no setter
isFiltered bool
Whether a filter is currently applied.
getter/setter pairinherited
itemRenderer ItemRenderer<T>?
A simple function to render the an item to string. @override
getter/setter pairinherited-getteroverride-setter
optimizeForDropdown bool
Whether to hide check-marks in a single select dropdown
getter/setter pair
options SelectionOptions<T>
The available options for this container.
getter/setter pairinherited-getteroverride-setter
previouslyToggledNode ↔ T?
The previously toggled node.
getter/setter pairinherited
renderingOptions MaterialTreeRenderingOptions?
final
role String
The ARIA role to use for the host element.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selection SelectionModel<T>
The selection model this container represents.
getter/setter pairinherited-getteroverride-setter
showFlatCheck bool
Whether to show a flat list of items with multi-selection.
no setter
showFlatList bool
Whether to show a flat list of items without any selection.
no setter
showFlatRadio bool
Whether to show a flat list of items with single-selection.
no setter
supportsFiltering bool
Whether the widget supports searching the data set.
no setterinherited
supportsHierarchy bool
Whether the widgets supports expansion and child data sets.
no setterinherited
treeGroupNodes List<MaterialTreeGroupComponent>?
getter/setter pair

Methods

collapseAllTreeGroups() → void
Collapses all tree groups.
expandAllTreeGroups() → void
Expands all tree groups.
maxInitialOptionsShown(OptionGroup group, int index) int?
How many items to show initially under a given option group.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldExpand(OptionGroup group, int index) bool
Whether to expand a given option group.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited