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

[Feature] Add a onNodeSelected callback #12

Open
nitrogene opened this issue Aug 28, 2018 · 8 comments
Open

[Feature] Add a onNodeSelected callback #12

nitrogene opened this issue Aug 28, 2018 · 8 comments
Assignees

Comments

@nitrogene
Copy link

Maybe i am missing something, but i could not find a way to trigger some actions when a node is selected ( In the following example, when by example "Titre 1" is selected)

capture

@azizali
Copy link
Owner

azizali commented Aug 29, 2018

Here is the example of that
http://azizali.com/react-super-treeview/examples/#checkbox

When a note is checked this callback gets triggerred
onCheckToggleCb

You can write a function that will run every time something is checked/unchecked.

Also this component has multi-check option. You can press shift on your keyboard and then check a range of notes. In that case the same prop onCheckToggleCb will trigger. This time with all the the nodes which were checked/unchecked.

@nitrogene
Copy link
Author

Is there a way to hide the checkboxes, while keeping the same behavior ?

@nitrogene
Copy link
Author

Something puzzles me. Using your example, if I click anywhere on a node line (starting from the checkbox and ending with the X mark), the callback is fired. In my case, the event is fired only if I click on the check box. The only difference I see is that i set isDeletable to false....

@azizali
Copy link
Owner

azizali commented Aug 29, 2018 via email

@nitrogene
Copy link
Author

nitrogene commented Aug 29, 2018 via email

@jason2li
Copy link

Agreed, I would like this feature as well.

@azizali azizali self-assigned this Jan 23, 2019
@sandipbgt
Copy link

any update on this feature?

@karthikaditya
Copy link

HI @azizali , is there a update on this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants