ng2-tree icon indicating copy to clipboard operation
ng2-tree copied to clipboard

How to get the selected node?

Open fanshouzhi opened this issue 7 years ago • 3 comments

fanshouzhi avatar May 14 '18 09:05 fanshouzhi

I am also trying to figure out how to get the selected node. I looked through the documentation and it is not there. I tried to look through the code, and couldn't find anything.

Anyone?

BertoMejia avatar Jul 12 '18 22:07 BertoMejia

Seems nodeSelected is fired when you click the label...

Hypenate avatar Aug 07 '18 12:08 Hypenate

Thanks for responding.

I know that when you click the node you can get it from the event. I'm currently using that. However, I'm looking to get it at other times.

To give you more information, my project requires to be able to press the delete key, and to be able to delete the selected node. Therefore, I need to get the current node after a keypress event. Is this possible?

BertoMejia avatar Aug 07 '18 20:08 BertoMejia