Global

Type Definitions

May be one of three possible types that specify either an <option>....</option> element or an <optgroup>....</optgroup> element as follows:

  • If a string, specifies the text of an <option>....</option> element with no value attribute. (In the absence of a value attribute, the value property of the element defaults to the text.)
  • If shaped like a valueItem object, specifies both the text and value of an <option....</option> element.
  • If shaped like a submenuItem object (or its alternate array form), specifies an <optgroup>....</optgroup> element.
Type:

Hierarchical array of select list items.

Data structure representing the list of <option>...</option> and <optgroup>...</optgroup> elements that make up a <select>...</select> element.

Alternate form: Instead of an object with a menu property containing an array, may itself be that array. Both forms have the optional label property.

Type:
Properties:
Name Type Attributes Description
label string <optional>

Defaults to a generated string of the form "Group n[.m]..." where each decimal position represents a level of the optgroup hierarchy.

submenu Array.<menuItem>

valueItem

You should supply both name and alias (or header) but you could omit one or the other and whichever you provide will be used for both.

If you only give the name property, you might as well just give a string for menuItem rather than this object. Only the name and alias (or header) properties are standard. You can invent whatever other properties you need, such as type and hidden, shown here as suggestions.

Type:
  • object
Properties:
Name Type Attributes Default Description
name string <optional>
alias || header

Value of value attribute of <option>...</option> element.

alias string <optional>
header

Text of <option>...</option> element. In practice, header is a synonym for alias.

header string <optional>
name

Text of <option>...</option> element. In practice, header is a synonym for alias.

type string <optional>

One of the keys of this.converters. If not one of these (including undefined), field values will be tested with a string comparison.

hidden boolean <optional>
false