Enable to attach extra fields to menu items.
This commit is contained in:
parent
452c350798
commit
c6f18f095e
1 changed files with 4 additions and 1 deletions
|
@ -52,7 +52,10 @@ Menu.buildFromTemplate = (template) ->
|
|||
throw new TypeError('Invalid template for MenuItem') unless typeof item is 'object'
|
||||
|
||||
item.submenu = Menu.buildFromTemplate item.submenu if item.submenu?
|
||||
menu.append new MenuItem(item)
|
||||
menuItem = new MenuItem(item)
|
||||
menuItem[key] = value for key, value of item
|
||||
|
||||
menu.append menuItem
|
||||
|
||||
menu
|
||||
|
||||
|
|
Loading…
Reference in a new issue