context-menu
Overview
Version compatibility
context-menu
was introduced in version 4.57.0 of the JourneyApps Runtime.
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 navigation drawer.
Referencing the image above, a context-menu
consists of:
Custom
item
elementsdivider
elementsNon-customizable app items, which are provided by the JourneyApps Runtime
Basic Example
Standard Attributes
None
Advanced Attributes
from-js
from-js
Optional
Default: unset
Construct a context-menu
from JavaScript/TypeScript using a $:function
that returns a contextMenu
object.
id
pageidid
items
items
Optional
Default: unset
Construct context-menu
items from Javascript/TypeScript using a $:function
that returns an object array of type contextMenuItem
.
item
elements can also be added individually to the context-menu
, see their reference documentation.
show-if
and hide-if
pageshow-ifpagehide-ifshow-if
and hide-if
Component Methods
The following component methods are available when an id
is assigned to the component and component.contextmenu({id:'my-id'})
is called from JS/TS:
select
select
Programmatically select an item from the context-menu
by its label.
Last updated