@react-stately/tree 3.0.0-nightly.2912 → 3.0.0-nightly.2925
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,7 +53,7 @@ $parcel$export(module.exports, "TreeCollection", () => $fae56b53b03726ff$export$
|
|
|
53
53
|
expandedKeys = expandedKeys || new Set();
|
|
54
54
|
let visit = (node)=>{
|
|
55
55
|
this.keyMap.set(node.key, node);
|
|
56
|
-
if (node.childNodes && (node.type ===
|
|
56
|
+
if (node.childNodes && (node.type === 'section' || expandedKeys.has(node.key))) for (let child of node.childNodes)visit(child);
|
|
57
57
|
};
|
|
58
58
|
for (let node of nodes)visit(node);
|
|
59
59
|
let last;
|
|
@@ -66,7 +66,7 @@ $parcel$export(module.exports, "TreeCollection", () => $fae56b53b03726ff$export$
|
|
|
66
66
|
this.firstKey = key;
|
|
67
67
|
node.prevKey = undefined;
|
|
68
68
|
}
|
|
69
|
-
if (node.type ===
|
|
69
|
+
if (node.type === 'item') node.index = index++;
|
|
70
70
|
last = node;
|
|
71
71
|
// Set nextKey as undefined since this might be the last node
|
|
72
72
|
// If it isn't the last node, last.nextKey will properly set at start of new loop
|
package/dist/TreeCollection.mjs
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
expandedKeys = expandedKeys || new Set();
|
|
48
48
|
let visit = (node)=>{
|
|
49
49
|
this.keyMap.set(node.key, node);
|
|
50
|
-
if (node.childNodes && (node.type ===
|
|
50
|
+
if (node.childNodes && (node.type === 'section' || expandedKeys.has(node.key))) for (let child of node.childNodes)visit(child);
|
|
51
51
|
};
|
|
52
52
|
for (let node of nodes)visit(node);
|
|
53
53
|
let last;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
this.firstKey = key;
|
|
61
61
|
node.prevKey = undefined;
|
|
62
62
|
}
|
|
63
|
-
if (node.type ===
|
|
63
|
+
if (node.type === 'item') node.index = index++;
|
|
64
64
|
last = node;
|
|
65
65
|
// Set nextKey as undefined since this might be the last node
|
|
66
66
|
// If it isn't the last node, last.nextKey will properly set at start of new loop
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
expandedKeys = expandedKeys || new Set();
|
|
48
48
|
let visit = (node)=>{
|
|
49
49
|
this.keyMap.set(node.key, node);
|
|
50
|
-
if (node.childNodes && (node.type ===
|
|
50
|
+
if (node.childNodes && (node.type === 'section' || expandedKeys.has(node.key))) for (let child of node.childNodes)visit(child);
|
|
51
51
|
};
|
|
52
52
|
for (let node of nodes)visit(node);
|
|
53
53
|
let last;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
this.firstKey = key;
|
|
61
61
|
node.prevKey = undefined;
|
|
62
62
|
}
|
|
63
|
-
if (node.type ===
|
|
63
|
+
if (node.type === 'item') node.index = index++;
|
|
64
64
|
last = node;
|
|
65
65
|
// Set nextKey as undefined since this might be the last node
|
|
66
66
|
// If it isn't the last node, last.nextKey will properly set at start of new loop
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-stately/tree",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.2925+c57671e7f",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-stately/collections": "3.0.0-nightly.
|
|
26
|
-
"@react-stately/selection": "3.0.0-nightly.
|
|
27
|
-
"@react-stately/utils": "3.0.0-nightly.
|
|
28
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
25
|
+
"@react-stately/collections": "3.0.0-nightly.2925+c57671e7f",
|
|
26
|
+
"@react-stately/selection": "3.0.0-nightly.2925+c57671e7f",
|
|
27
|
+
"@react-stately/utils": "3.0.0-nightly.2925+c57671e7f",
|
|
28
|
+
"@react-types/shared": "3.0.0-nightly.2925+c57671e7f",
|
|
29
29
|
"@swc/helpers": "^0.5.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "c57671e7f57c4ffe59640a174f084cf660968913"
|
|
38
38
|
}
|