MenuItem

MenuItem

A MenuItem object as defined in the JSON schema. It represents an item in a menu. Depending on its type, a menu item can be either an option (type=option) or an option separator (type=content).

Constructor

Instantiates a new MenuItem

Parameters:
Name Type Description
props object

Properties to initialize the menu item with.

Properties
Name Type Attributes Description
description string

Sets MenuItem#description

textSearch string <optional>

Sets MenuItem#textSearch

method 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' <optional>

Sets MenuItem#method

path string <optional>

Sets MenuItem#path

Source:

Members

description :string

The displayed text of a menu item.

Source:

method :string

The HTTP method called when the menu item is selected.

Source:

path :string

The path called when the menu item is selected.

Source:

textSearch :string

Field to add more context for searching in options.

Source:

(readonly) type :string

The type of the menu item (content or option).

Source:

Methods

(static) fromTag(tag) → {MenuItem}

Creates a MenuItem from a SectionTag's child

Parameters:
Name Type Description
tag LiTag | BrTag | PTag | LabelTag | InputTag | string
Source: