Class: module:view/menu/MenuItem

module:view/menu/MenuItem(object, prop, setProp, label, options, change, changes, commander)

new module:view/menu/MenuItem(object, prop, setProp, label, options, change, changes, commander)

Make a selection that determines a single property's value. Defer handling dependent calculations to the next update step, where we will look at a dependency tree to determine what else needs updating. Functionality here is called from button presses. Functionality here is also called from a command pattern (commander).
Parameters:
Name Type Description
object Object.<string>
Properties
Name Type Description
prop String | Number | Boolean The property being selected in the menu.
prop String Name of prop
setProp MenuItem~setProp The action that is performed as part of onclick.
label String The prompt presented to the user.
options Array.<Object> the list of options that the UI presents to the user.
Properties
Name Type Description
value String | Number | Boolean Value to pass to setProp
change Array.<String> list of changes made when pressing a button.
changes Changes
commander Commander Follows command pattern.
Source: