react-super-treeview icon indicating copy to clipboard operation
react-super-treeview copied to clipboard

[Feature] Add a onNodeSelected callback

Open nitrogene opened this issue 6 years ago • 8 comments

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

nitrogene avatar Aug 28 '18 14:08 nitrogene

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.

azizali avatar Aug 29 '18 11:08 azizali

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

nitrogene avatar Aug 29 '18 15:08 nitrogene

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....

nitrogene avatar Aug 29 '18 15:08 nitrogene

Oh so like making the select feature on click of the label and not show the check box?

This is not currently possible but I can add that in the next version.

On Wed, Aug 29, 2018, 10:03 AM Gervasoni [email protected] wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/azizali/react-super-treeview/issues/12#issuecomment-416986302, or mute the thread https://github.com/notifications/unsubscribe-auth/ACfoLKq3bNVf2CqtiXL1l2Z-fd9PLFo5ks5uVq0ugaJpZM4WPvyT .

azizali avatar Aug 29 '18 15:08 azizali

That would be great :)

Le mer. 29 août 2018 à 17:49, Aziz Ali [email protected] a écrit :

Oh so like making the select feature on click of the label and not show the check box?

This is not currently possible but I can add that in the next version.

On Wed, Aug 29, 2018, 10:03 AM Gervasoni [email protected] wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/azizali/react-super-treeview/issues/12#issuecomment-416986302 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ACfoLKq3bNVf2CqtiXL1l2Z-fd9PLFo5ks5uVq0ugaJpZM4WPvyT

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/azizali/react-super-treeview/issues/12#issuecomment-417001430, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQztPT6xE2mXmDauAlfVbkmZLhNmMoxks5uVrfzgaJpZM4WPvyT .

nitrogene avatar Aug 29 '18 17:08 nitrogene

Agreed, I would like this feature as well.

jason2li avatar Sep 24 '18 22:09 jason2li

any update on this feature?

sandipbgt avatar Jun 25 '19 02:06 sandipbgt

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

karthikaditya avatar May 27 '22 05:05 karthikaditya