Class: SelectUI

SelectUI

Members

itemsArray

List of available select options.

Instance of Menu.

Methods

build()

Build DOM structure.

closeOptions()

Close select dropdown menu.

destroy()

Destroy instance.

openOptions()

Open select dropdown menu with available options.

registerHooks()

Register all necessary hooks.

setItems(items)

Set options which can be selected in the list.

Parameters:
Name Type Description
items Array

Array of objects with required keys key and name.

translateNames(items){Array}

Translate names of menu items.

Parameters:
Name Type Description
items Array

Array of objects with required keys key and name.

Returns: {Array} Items with translated name keys.

update()

Update DOM structure.