Reputation: 43
Hi I am trying to have a menu open up when i right click on any treelist item. Based on the element I right click on, i need to show a dynamic menu with options. How can i achieve this. I am new to modern toolkit of Ext 7 and am migrating my code from EXT 5 to EXT 7. Please help.
Upvotes: 1
Views: 269
Reputation: 43
contextmenu event on the element works. I was able to figure it out myself.
The below code helps
{
xtype: 'treelist',
reference: 'projectMenu',
highlightPath: true,
bind: {
store: '{navItems}'
},
listeners: {
'contextmenu': {
element: 'element', //bind to the underlying element property on the panel
fn: 'onContextMenu'
}
}
}
Upvotes: 1