title: Electron modify a single menu item?
body: <p>So, I'm building a softare using <a href="https://electronjs.org/" rel="nofollow noreferrer">electron</a>. Now I can add menu in the software from a template </p>
  
  <pre><code>var menu = Menu.buildFromTemplate([
    {
        label: 'Menu',
        submenu: [
            {label:'open'},
            {label:'save'},
            {label:'Exit'}
        ]
    }
  ])
  Menu.setApplicationMenu(menu);
  </code></pre>
  
  <p>But how do I modify a single menu item. For example, say, the <code>save</code> menu is disabled by default and activated after the <code>open</code> is clicked. Also say after clicking <code>open</code> a new menu <code>edit</code> 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?</p>