SelectMenu

SelectMenu

new SelectMenu()

Main Scroller class constructor

Methods

(private, static) _changed()

Event: Select menu changed

(private, static) _getAttributes(attributes)

Format the option attributes if any into an object literal

Parameters:
Name Type Description
attributes array

The array of item attributes

(private, static) _getSizes()

Get the open size

(private, static) _initialize()

Initialize the component

(private, static) _removeEvents()

Set the events for the select menu

(private, static) _render()

Render the component element, this method can be called any number of times if the data for the component is added again

(private, static) _setElements()

Returns an object with the default html elements added

(private, static) _setEvents()

Set the events for the select menu

(private, static) _setSelOptions(list, options, type)

Set Attributes to the option elements

Parameters:
Name Type Description
list node

The list element which is either a

options array

The options list array of data

type string

The type of select menu

(private, static) _toggle()

Event: Select menu opened

(private, static) _toggleEvents()

Toggle List events, required because we are refreshing the display

(private, static) _windowUp()

Event: Window Up

(static) addItem(values)

Add a new item to the list

Parameters:
Name Type Description
values object

The property object for the new data

(static) destroy()

Destroy the component and remove all elements from the dom and clear all events added, returns a null value in the event the object was stored in a reference to nullify the reference

(static) disable()

Disable the select menu item

(static) enable()

Enable the select menu item

(private, static) getSelected(index)

Get the selected option(s)

Parameters:
Name Type Description
index number

The index to get the selectmenu for

(static) removeItem(index)

Remove an item from the list and refresh

Parameters:
Name Type Description
index number

The index to remove

(private, static) setSelected(index)

Set the selected option element

Parameters:
Name Type Description
index number

The index to set the selectmenu for

(static) update(data)

Update the select list

Parameters:
Name Type Description
data object

The data object to update with

(static) updateItem(index, values)

Update an item node value or attribute

Parameters:
Name Type Description
index number

The index to update

values object

The property object for the data