Hi,
I want to display a submenu inside a contextmenu, which contains options depending on the cell clicked.
If I hard code the submenu items like so, it renders ok:
contextMenu: {
items: {
anItem: {
submenu: {
items: [{key:'anItem:red', name:'red'}]
}
}
}
}
But I try to bind items to an inline function call, where I could generate a dynamic list of items to bind, like so, the function doesn’t get invoked and the submenu doesn’t contain any items:
contextMenu: {
items: {
anItem: {
submenu: {
items: () => {
return [{key:'anItem:red', name:'red'}];
}
}
}
}
}
How can I achieve this? Thanks