TabbedUI Client-side EventsonFavoriteSet
Description
Fires when a menu item is added to favorites.
Discussion
This event is fired when the user adds a menu button to their favorites in the Tabbed UI.
Arguments
- eobject
An object with the following properties:
- idstring
The ID of the button passed to the event. The ID is the idInternal property of the button with the prefix of "FAV" added to the the ID. For example, if the button's idInternal value is "e5350ed3-6547-41fc-a777-a657b533e95a", e.id will be "FAVe5350ed3-6547-41fc-a777-a657b533e95a".
- buttonsarray
An array containing the buttons in the Tabbed UI menu. Each array entry is an object with the following properties:
- favoriteboolean
Indicates if the button is a favorite button.
- icontext
The icon shown for the button, if the button has been configured to display an icon.
- idInternaltext
The ID of the button.
- javascriptTexttext
The JavaScript executed when the button is clicked.
- texttext
The text shown on the button.
The example below searches the button list for the button that was added to favorites and displays a message the button was added:
var result = e.buttons.find(item => { return e.id.includes(item.idInternal); }); alert(result.text + " was added to Favorites");
See Also