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: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,7 +245,7 @@ The rules object has the following shape:
245
245
-`open: boolean` - this rule changes the openness state for the owner node only (subtree nodes are not affected).
246
246
-`subtreeCallback(node: object, ownerNode: object): void` - this callback runs against each node in the subtree of the owner node (including the owner node as well). It receives the subtree node and the owner node. Changing any property of the subtree node will affect the node state and how it will be displayed (e.g. if you change the node openness state it will be displayed according to the changed state).
247
247
248
-
The order of rules matters. If you specify the child node rules before the parent node rules, and that rules affect the same property, the parent node `subtreeWalker` will override that property. So if you want to override parent's rules, place children rules after the parent's.
248
+
The order of rules matters. If you specify the child node rules before the parent node rules, and that rules affect the same property, the parent node `subtreeCallback` will override that property. So if you want to override parent's rules, place children rules after the parent's.
249
249
250
250
The type of the node objects received by `subtreeCallback` is `FixedSizeNodePublicState`. See the [types description](#types) below.
251
251
@@ -278,8 +278,8 @@ const tree = {
278
278
tree.recomputeTree({
279
279
'root-1': {
280
280
open:false,
281
-
subtreeWalker(node, ownerNode) {
282
-
// Since subtreeWalker affects the ownerNode as well, we can check if the
281
+
subtreeCallback(node, ownerNode) {
282
+
// Since subtreeCallback affects the ownerNode as well, we can check if the
283
283
// nodes are the same, and run the action only if they aren't
Using node IDs as keys should improve React rendering performance. However, it means that you won't be able to use `Symbol` as IDs anymore. You should move all your IDs to be strings instead of symbols.
662
+
Using node IDs as keys should improve React rendering performance. However, it means that you won't be able to use `Symbol` as IDs anymore. You should move all your IDs to be strings instead of symbols.
0 commit comments