@@ -15,8 +15,7 @@ import 'package:angular_components/model/ui/has_factory.dart';
1515
1616/// A material selection component that supports a tree of options.
1717///
18- /// To use, simply pass in a minimum of [options] to see items:
19- /// <material-tree [options]="selectionOptions"></material-tree>
18+ /// To use, simply pass in a minimum of [options] to see items.
2019///
2120/// If [SelectionOptions] implements the [Parent] interface, a handle is shown
2221/// for each option that [Parent.hasChildren] is set for, and toggling the
@@ -26,21 +25,8 @@ import 'package:angular_components/model/ui/has_factory.dart';
2625/// If [SelectionOptions] implements the [Filterable] interface.
2726///
2827/// To receive feedback from the component, a [selection] model is required.
29- /// <material-tree
30- /// [options]="selectionOptions"
31- /// [selection]="selectionModel">
32- /// </material-tree>
3328///
34- /// To customize, specify an [itemRenderer] and/or [componentRenderer] .
35- ///
36- /// You may add an HTML attribute 'in-dropdown' to optimize use in a dropdown;
37- /// for example, this will hide checks in a single selection since the selection
38- /// state is already known:
39- /// <material-tree
40- /// dropdown
41- /// [options]="selectionOptions"
42- /// [selection]="selectionModel">
43- /// </material-tree>
29+ /// To customize, specify an [itemRenderer] and/or [factoryRenderer] .
4430@Component (
4531 selector: 'material-tree' ,
4632 directives: const [
@@ -57,6 +43,7 @@ import 'package:angular_components/model/ui/has_factory.dart';
5743 templateUrl: 'material_tree_impl.html' ,
5844)
5945class MaterialTreeComponent extends SelectionContainer with MaterialTreeRoot {
46+ /// Whether to hide check-marks in a single select dropdown
6047 @Input ()
6148 @override
6249 bool optimizeForDropdown;
@@ -69,39 +56,52 @@ class MaterialTreeComponent extends SelectionContainer with MaterialTreeRoot {
6956 selection = const SelectionModel .empty ();
7057 }
7158
59+ @Deprecated ('Use [factoryRenderer] instead' )
7260 @Input ()
7361 @override
7462 set componentRenderer (ComponentRenderer value) {
7563 super .componentRenderer = value;
7664 }
7765
66+ /// Specifies the factoryRenderer to use to determine the factory for
67+ /// rendering an item.
7868 @Input ()
7969 @override
8070 set factoryRenderer (FactoryRenderer value) {
8171 super .factoryRenderer = value;
8272 }
8373
74+ /// A simple function to render the item to string.
8475 @Input ()
8576 @override
8677 set itemRenderer (ItemRenderer value) {
8778 super .itemRenderer = value;
8879 }
8980
81+ /// The available options for this contianer.
9082 @Input ()
9183 @override
9284 set options (SelectionOptions value) {
9385 super .options = value;
9486 }
9587
88+ /// The selection model this container represents.
9689 @Input ()
9790 @override
9891 set selection (SelectionModel value) {
9992 super .selection = value;
10093 }
10194
95+ /// Whether to always expand an option group.
10296 @Input ()
10397 bool expandAll = false ;
10498
99+ /// Whether the widgets supports the selection of non-leaf nodes
100+ ///
101+ /// When `false` , and the widget is using a single selection model clicking
102+ /// the widget should toggle expansion when a non-leaf node is clicked. When
103+ /// `true` the widget should select non-leaf nodes when clicked and only
104+ /// toggle expansion when the expansion icon is clicked.
105105 @Input ()
106106 @override
107107 bool allowParentSingleSelection = false ;
0 commit comments