@bitrise/bitkit 13.295.0 → 13.296.0
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.
package/package.json
CHANGED
|
@@ -13,7 +13,19 @@ const TreeViewBranch = (props: PropsWithChildren<Omit<NodeData, 'type' | 'childr
|
|
|
13
13
|
|
|
14
14
|
const renderTreeNodes = (nodes: NodeData[]) => {
|
|
15
15
|
return nodes.map((node) => {
|
|
16
|
-
const {
|
|
16
|
+
const {
|
|
17
|
+
id,
|
|
18
|
+
type,
|
|
19
|
+
title,
|
|
20
|
+
description,
|
|
21
|
+
iconName,
|
|
22
|
+
iconColor,
|
|
23
|
+
label,
|
|
24
|
+
labelIconName,
|
|
25
|
+
labelIconColor,
|
|
26
|
+
children,
|
|
27
|
+
onClick,
|
|
28
|
+
} = node;
|
|
17
29
|
|
|
18
30
|
if (type === 'branch') {
|
|
19
31
|
return (
|
|
@@ -32,6 +44,7 @@ const renderTreeNodes = (nodes: NodeData[]) => {
|
|
|
32
44
|
level={-1}
|
|
33
45
|
indexPath={[]}
|
|
34
46
|
titlePath={[]}
|
|
47
|
+
onClick={onClick}
|
|
35
48
|
>
|
|
36
49
|
{children && renderTreeNodes(children)}
|
|
37
50
|
</TreeViewNode>
|
|
@@ -54,6 +67,7 @@ const renderTreeNodes = (nodes: NodeData[]) => {
|
|
|
54
67
|
level={-1}
|
|
55
68
|
indexPath={[]}
|
|
56
69
|
titlePath={[]}
|
|
70
|
+
onClick={onClick}
|
|
57
71
|
/>
|
|
58
72
|
);
|
|
59
73
|
});
|
|
@@ -115,6 +115,7 @@ const TreeViewNode = ({
|
|
|
115
115
|
label,
|
|
116
116
|
labelIconName,
|
|
117
117
|
labelIconColor,
|
|
118
|
+
onClick,
|
|
118
119
|
// NodePath
|
|
119
120
|
level,
|
|
120
121
|
indexPath,
|
|
@@ -165,6 +166,10 @@ const TreeViewNode = ({
|
|
|
165
166
|
},
|
|
166
167
|
});
|
|
167
168
|
}
|
|
169
|
+
|
|
170
|
+
if (onClick) {
|
|
171
|
+
onClick();
|
|
172
|
+
}
|
|
168
173
|
}, [
|
|
169
174
|
id,
|
|
170
175
|
type,
|