arvindr21 / jsTree-directive

An Angular Directive for jsTree. Docs :
http://jstree-directive.herokuapp.com/
51 stars 33 forks source link

custom context menu doesnt work #34

Closed antonyboom closed 8 years ago

antonyboom commented 8 years ago

so this example of my plunker. I did every step follow by doc but the custom menu doesn't work. Where is my problem?

antonyboom commented 8 years ago

The problem was that directive has provided here isn't working. I have found some fiddle example with old one directive and put it in my app, hope it helps

Farhan42 commented 6 years ago

To use custom context menu, replace code in the directive with the provided one Orignal: if (config.plugins.indexOf('contextmenu') >= 0) { if (a.treeContextmenu) { config.contextmenu = s[a.treeContextmenu]; } }

Replace With if (config.plugins.indexOf('contextmenu') >= 0) { if (a.treeContextmenu) { config.contextmenu = s[a.treeContextmenu]; config.contextmenu = { items: s[a.treeContextmenu] }; } }