Closed kapilpundit closed 5 years ago
Hello @kapilpundit ! Yes, you right, at the moment you can do this, but its good idea, I implement it today. Stay in touch. Thank you for smart issue.
Hey @kapilpundit good news for you! I update package to 2.4.1 version.
Now you able to trigger
onStartRenameItem()
and
onFinishRenameItem()
update package by run npm install ngx-tree-dnd
@kapilpundit please let me know if new version help in you issue. If its help you can close it, also you can star project;)
Hi Zicrael,
I have upgraded to 2.4.1 and here's my html code:
<lib-ngx-tree-component [treeData]='categoryTree' [config]='config' (onstartrenameitem)="onStartRenameItem($event)"></lib-ngx-tree-component>
Here's component method:
onStartRenameItem(event) { console.log('rename'); }
But still I am not able to get the event to trigger.
Thanks,
I change type of this things to camel case ( likeThisOne ) so type:
(onStartRenameItem)="onStartRenameItem($event)"
instead
(onstartrenameitem)="onStartRenameItem($event)"
.
At the moment only onStartRenameItem and onFinishRename item in camel case , but notice in funure versioins i change them all to camelCase.
@Zicrael I had tried that also, but it didn't work. Do I have to add / change something in config?
@kapilpundit You have latest version? Check in stackblitz, updated demo. It is work fine. Please check it now https://stackblitz.com/edit/ngx-tree-dnd Is props in you code simillar?
@Zicrael yes I have copied your latest code from https://stackblitz.com/edit/ngx-tree-dnd and I see it working there. I am not able to do it on my system. My browser version is also latest. i dont know what could be the problem..
@Zicrael Yes, its working now. It was some cashing issue on our server. Thanks a lot for your support. Really nice library.
I am closing the issue now.
@kapilpundit thank you for good works;) have a good day, also if you like it star it ;)
Sure I will star it :)
I see you have provided (onrenameitem) event, which triggers once the user has updated the node in the tree and clicked on the check mark.
But, can we have an event when the edit button is clicked, because I would like to open a new page when we click on edit button. Thanks.