react-ui-tree
react-ui-tree copied to clipboard
Styles
Is it possible to change CSS on a node when it's clicked? I'd like to check and uncheck items when they are selected.
I'm not an expert with this project, but I might be able to help...
There are two ways you might be able to accomplish this. One is that selected nodes get an is-active class – if it's just styling, you should be able to work off of that.
If you want to trigger an event by adding your action to the onClickNode method. Here's what it looks like in the example:
onClickNode(node) {
this.setState({
active: node
});
},
Now... I'd like to be able to trigger an action on the end of dragging as well! That's my next job :)