Skip to content

Commit 01f0a64

Browse files
committed
documentations
1 parent 050cfcd commit 01f0a64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/documentation/docs/controls/TreeView.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { TreeView, ITreeItem } from "@pnp/spfx-controls-react/lib/TreeView";
3939
treeItemActionsDisplayMode={TreeItemActionsDisplayMode.ContextualMenu}
4040
defaultSelectedKeys={['key1', 'key2']},
4141
expandToSelected={true}
42+
defaultExpandedChildren={true}
4243
onSelect={this.onTreeItemSelect}
4344
onExpandCollapse={this.onTreeItemExpandCollapse}
4445
onRenderItem={this.renderCustomTreeItem} />
@@ -88,7 +89,7 @@ The `TreeView` control can be configured with the following properties:
8889
| Property | Type | Required | Description |
8990
|--------------------------------|----------------------------|----------|------------------------------------------------------------------------------------------------------------------------------------|
9091
| items | ITreeItem[] | yes | An array of tree items to display. refer [example](#example-of-array-of-tree-items-used-to-render-control-as-in-first-screenshot). |
91-
| defaultExpanded | boolean | no | Specify if the tree items are displayed as expanded by default (defaults to false). |
92+
| defaultExpanded | boolean | no | Specify if the tree items are displayed as expanded by default (defaults to false. |
9293
| selectionMode | enum | no | Specifies the selection mode of tree view (defaults to Single selection). |
9394
| selectChildrenIfParentSelected | boolean | no | Specifies if the childrens should be selected when parent item is selected (defaults to false). |
9495
| showCheckboxes | boolean | yes | Specify if the checkboxes should be displayed for selection. |
@@ -98,6 +99,7 @@ The `TreeView` control can be configured with the following properties:
9899
| onExpandCollapse | function | no | Defines a onExpandCollapse function to raise when the tree item has expanded or collapsed. |
99100
| onSelect | function | no | Captures the event of when the tree item selection has changed. |
100101
| onRenderItem | function | no | Optional callback to provide custom rendering of the item (default is simple text of item label and a checkbox for selection). |
102+
| defaultExpandedChildren | boolean | no | Default expand / collapse behavior for the child nodes. By default this is set to true. |
101103
102104
Enum `TreeViewSelectionMode`
103105

0 commit comments

Comments
 (0)