Constructor

List

new List(list)

Constructor for List. Accepts optional List to clone, string title, or list of items to copy.

Parameter

list

Optional

(List, string, or Array of OptionItem)

Either a list to clone, a title to set for a new List, or an array of OptionItem to initialize a new list.

Properties

items

Array of OptionItems

List of 2-20 items to show in this list. Required.

title

string

Title of the list. Optional.

Methods

addItems

addItems(optionItems) returns List

Adds a single item or list of items to the list.

Parameter

optionItems

(OptionItem or Array of OptionItem)

OptionItems to add.

Returns

List Returns current constructed List.

setTitle

setTitle(title) returns List

Sets the title for this List.

Parameter

title

string

Title to show on list.

Returns

List Returns current constructed List.