We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a49877 commit a89ace9Copy full SHA for a89ace9
src/components/App.js
@@ -14,7 +14,8 @@ class App extends Component {
14
constructor(props) {
15
super(props);
16
this.state = {
17
- treeData: treeData
+ treeData: treeData,
18
+ selectedEntity: null
19
};
20
}
21
@@ -51,7 +52,10 @@ class App extends Component {
51
52
53
updatedTreeData = updateChildren(updatedTreeData);
54
- this.setState({ treeData: updatedTreeData });
55
+ // Log selected entity
56
+ console.log(`Selected ${payload.type}:`, payload.name);
57
+
58
+ this.setState({ treeData: updatedTreeData, selectedEntity: payload });
59
60
61
render = () => {
0 commit comments