context-menu
Last updated
Last updated
The context-menu
is accessible via the ‘more’ icon on the right-hand-side of the app title bar.
context-menu
should be used to display contextual items or actions relevant to the current view. Items that are relevant to the app globally (e.g. About, Messages, selecting a different language) should rather be displayed in the .
Referencing the image above, a context-menu
consists of:
Non-customizable app items, which are provided by the JourneyApps Runtime
None
from-js
Optional
Default: unset
id
items
Optional
Default: unset
show-if
and hide-if
select
Programmatically select an item from the context-menu
by its label.
Custom elements
elements
Construct a context-menu
from JavaScript/TypeScript using a that returns a contextMenu
object.
Construct context-menu
items from Javascript/TypeScript using a that returns an object array of type contextMenuItem
.
item
elements can also be added individually to the context-menu
, see their .
The following component methods are available when an is assigned to the component and component.contextmenu({id:'my-id'})
is called from JS/TS: