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
Copy file name to clipboardExpand all lines: src/InfiniteTree.jsx
+24-3Lines changed: 24 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ export default class extends Component {
14
14
// Whether to open all nodes when tree is loaded.
15
15
autoOpen: PropTypes.bool,
16
16
17
-
// Sets `true` to make tree nodes selectable,
17
+
// Whether or not a node is selectable in the tree.
18
18
selectable: PropTypes.bool,
19
19
20
20
// Specifies the tab order to make tree focusable.
@@ -26,13 +26,13 @@ export default class extends Component {
26
26
PropTypes.object
27
27
]),
28
28
29
-
// Width of tree view.
29
+
// Width of the tree.
30
30
width: PropTypes.oneOfType([
31
31
PropTypes.string,
32
32
PropTypes.number
33
33
]).isRequired,
34
34
35
-
// Height of tree view.
35
+
// Height of the tree.
36
36
height: PropTypes.oneOfType([
37
37
PropTypes.string,
38
38
PropTypes.number
@@ -54,20 +54,41 @@ export default class extends Component {
54
54
// Provides a function to determine if a node can be selected or deselected. The function must return `true` or `false`. This function will not take effect if `selectable` is not `true`.
55
55
shouldSelectNode: PropTypes.func,
56
56
57
+
// Controls the scroll offset.
57
58
scrollOffset: PropTypes.number,
59
+
60
+
// Node index to scroll to.
58
61
scrollToIndex: PropTypes.number,
62
+
63
+
// Callback invoked whenever the scroll offset changes.
59
64
onScroll: PropTypes.func,
60
65
66
+
// Callback invoked before updating the tree.
61
67
onContentWillUpdate: PropTypes.func,
68
+
69
+
// Callback invoked when the tree is updated.
62
70
onContentDidUpdate: PropTypes.func,
71
+
72
+
// Callback invoked when a node is opened.
63
73
onOpenNode: PropTypes.func,
74
+
75
+
// Callback invoked when a node is closed.
64
76
onCloseNode: PropTypes.func,
77
+
78
+
// Callback invoked when a node is selected or deselected.
65
79
onSelectNode: PropTypes.func,
80
+
81
+
// Callback invoked before opening a node.
66
82
onWillOpenNode: PropTypes.func,
83
+
84
+
// Callback invoked before closing a node.
67
85
onWillCloseNode: PropTypes.func,
86
+
87
+
// Callback invoked before selecting or deselecting a node.
0 commit comments