Skip to content

Context Menu

Context Menu allows you to implement actions associated with Object Table or Contact Table.

In the mobile environment, it is triggered by swiping the item left or right. The Context Menu supports the use of interactive elements within the cell being swiped.

The Context Menu can render multiple menu items on the iOS platform. However, it displays only the first menu item on the Android platform. If there's more than 3 menu items on the iOS platform, it displays the first 2 menu items inline and the 3rd menu item is displayed as More menu item. Tapping the More menu item, displays all the menu items as action sheet on the phone and as popover on the pad.

In the web environment, an overflow button is visible in the cell, when selected, it displays a popover with all the menu items which combines leading and trailing menu items together.

Change the Context Menu at the Runtime

Changing the Context menu can be made by changing their leading and trailing menu items, it can be set by the rule at the runtime. This allows app to change a specific cell's context menu items at runtime when certain state changes prompt update to the menu items.

export default function setContextMenu(clientAPI) {
  let contextMenu = clientAPI.getExecutedContextMenuItem();
  contextMenu.setLeadingItems = ["Submit", 'Transfer', 'Complete'];
  contextMenu.setTrailingItems = ['Create', 'Update', 'Delete'];
}

Last update: December 7, 2020