You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d4426fc
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: components/tree-view/doc/index.en-US.md
+62-64Lines changed: 62 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,139 +16,137 @@ import { NzTreeViewModule } from 'ng-zorro-antd/tree-view';
16
16
17
17
## API
18
18
19
-
### nz-tree-view
19
+
### nz-tree-view:standalone
20
20
21
-
| Property | Description | Type | Default |
22
-
| --- | --- | --- | --- |
23
-
|[nzTreeControl]| The tree controller |[TreeControl](https://material.angular.io/cdk/tree/api#TreeControl)| - |
24
-
|[nzDataSource]| The data array to render |[DataSource](https://material.angular.io/cdk/tree/overview#data-source)<T>\| Observable<T[]> \| T[]| - |
25
-
|[nzDirectoryTree]| Whether nodes are displayed as directory style |`boolean`|`false`|
26
-
|[nzBlockNode]| Whether tree nodes fill remaining horizontal space|`boolean`|`false`|
|[nzTreeControl]| The tree controller |[TreeControl](https://material.angular.io/cdk/tree/api#TreeControl)| -|
24
+
|[nzDataSource]| The data array to render |[DataSource](https://material.angular.io/cdk/tree/overview#data-source)<T>\| Observable<T[]> \| T[]| -|
25
+
|[nzDirectoryTree]| Whether nodes are displayed as directory style |`boolean`|`false`|
26
+
|[nzBlockNode]| Whether tree nodes fill remaining horizontal space|`boolean`|`false`|
27
27
28
-
### nz-tree-virtual-scroll-view
28
+
### nz-tree-virtual-scroll-view:standalone
29
29
30
30
The virtual scroll tree view, which can be accessed from
31
31
the [CdkVirtualScrollViewport](https://material.angular.io/cdk/scrolling/api#CdkVirtualScrollViewport) instance through
32
32
the `virtualScrollViewport` member of the component instance.
33
33
34
-
| Property | Description | Type | Default |
35
-
| --- | --- | --- | --- |
36
-
|[nzTreeControl]| The tree controller |[TreeControl](https://material.angular.io/cdk/tree/api#TreeControl)| - |
37
-
|[nzDataSource]| The data array to render |[DataSource](https://material.angular.io/cdk/tree/overview#data-source)<T>\| Observable<T[]> \| T[]| - |
38
-
|[nzDirectoryTree]| Whether nodes are displayed as directory style |`boolean`|`false`|
39
-
|[nzBlockNode]| Whether tree nodes fill remaining horizontal space|`boolean`|`false`|
40
-
|[nzItemSize]| The size of nodes in the tree (in pixels) |`number`|`28`|
41
-
|[nzMinBufferPx]| The minimum amount of buffer rendered allowed outside the viewport (in pixels) |`number`|`28 * 5`|
42
-
|[nzMaxBufferPx]|The amount of buffer required for rendering new nodes (in pixels) |`number`|`28 * 10`|
|[nzTreeControl]| The tree controller |[TreeControl](https://material.angular.io/cdk/tree/api#TreeControl)| -|
37
+
|[nzDataSource]| The data array to render |[DataSource](https://material.angular.io/cdk/tree/overview#data-source)<T>\| Observable<T[]> \| T[]| -|
38
+
|[nzDirectoryTree]| Whether nodes are displayed as directory style |`boolean`|`false`|
39
+
|[nzBlockNode]| Whether tree nodes fill remaining horizontal space|`boolean`|`false`|
40
+
|[nzItemSize]| The size of nodes in the tree (in pixels) |`number`|`28`|
41
+
|[nzMinBufferPx]| The minimum amount of buffer rendered allowed outside the viewport (in pixels) |`number`|`28 * 5`|
42
+
|[nzMaxBufferPx]|The amount of buffer required for rendering new nodes (in pixels) |`number`|`28 * 10`|
43
43
44
-
### [nzTreeNodeDef]
44
+
### [nzTreeNodeDef]:standalone
45
45
46
46
Directive to define `nz-tree-node`.
47
47
48
-
| Property | Description | Type | Default |
49
-
| --- | --- | --- | --- |
50
-
|[nzTreeNodeDefWhen]|A matching function which indicates whether inputted node should be used. It matches the very first node that makes this function return `true`. If no nodes that makes this function return `true`, the node which does not define this function would be matched instead. |`(index: number, nodeData: T) => boolean`| - |
|[nzTreeNodeDefWhen]| A matching function which indicates whether inputted node should be used. It matches the very first node that makes this function return `true`. If no nodes that makes this function return `true`, the node which does not define this function would be matched instead. |`(index: number, nodeData: T) => boolean`| -|
51
51
52
-
### nz-tree-node
52
+
### nz-tree-node:standalone
53
53
54
54
The tree node container component, which needs to be defined by the `nzTreeNodeDef` directive.
55
55
56
-
### [nzTreeNodePadding]
56
+
### [nzTreeNodePadding]:standalone
57
57
58
58
```html
59
-
60
59
<nz-tree-nodenzTreeNodePadding></nz-tree-node>
61
60
```
62
61
63
62
Show node indentation by adding `padding`**Best Performance**.
64
63
65
-
### nzTreeNodeIndentLine
64
+
### nzTreeNodeIndentLine:standalone
66
65
67
66
```html
68
-
69
67
<nz-tree-nodenzTreeNodeIndentLine></nz-tree-node>
70
68
```
71
69
72
70
Show node indentation by adding indent lines.
73
71
74
-
### nz-tree-node-toggle
72
+
### nz-tree-node-toggle:standalone
75
73
76
74
A toggle which is used to expand / collapse the node.
0 commit comments