So, I'm building a softare using electron. Now I can add menu in the software from a template
var menu = Menu.buildFromTemplate([
{
label: 'Menu',
submenu: [
{label:'open'},
{label:'save'},
{label:'Exit'}
]
}
])
Menu.setApplicationMenu(menu);
But how do I modify a single menu item. For example, say, the save menu is disabled by default and activated after the open is clicked. Also say after clicking open a new menu edit appears. I can create the complete new template in full and just change the previous template with the new. But thats a bad way and can't be a practical solution when I'm using several menus with several submenus. So can I modify just one single menu item of my choice?