Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styles #49

Open
rschlack opened this issue Nov 4, 2016 · 1 comment
Open

Styles #49

rschlack opened this issue Nov 4, 2016 · 1 comment
Labels
Milestone

Comments

@rschlack
Copy link

rschlack commented Nov 4, 2016

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.

@shankie-codes
Copy link

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 :)

@wangzuo wangzuo added this to the 5.0 milestone Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants