Skip to content

Commit b114602

Browse files
committed
#417 prevent propagation on controlPanelTreeItem click
1 parent d853ac0 commit b114602

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

webapp/components/general/ControlPanelTreeItem.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ const ControlPanelTreeItem = (props) => {
4040
const [color, setColor] = React.useState('#ff0000');
4141

4242
const handleColorSelection = (color, event, nodeId) => {
43-
event.preventDefault();
44-
event.stopPropagation();
4543
setColor(color.hex);
4644
};
4745

@@ -52,7 +50,6 @@ const ControlPanelTreeItem = (props) => {
5250
b: parseFloat((Math.random() * 1.00).toFixed(2)),
5351
a: 1,
5452
};
55-
console.log('random color rgba', randomColor);
5653
setColor(randomColor);
5754
};
5855

webapp/components/general/ExperimentControlPanel.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const ExperimentControlPanel = (props) => {
2525
const classes = useStyles();
2626
const [filter, setFilter] = React.useState('');
2727
const onNodeSelect = (event, nodeId) => {
28+
event.preventDefault();
29+
event.stopPropagation();
2830
console.log(`Node with id ${nodeId} clicked`);
2931
};
3032

0 commit comments

Comments
 (0)