AutocompleteSelectpicker

AutocompleteSelectpicker

Autocomplete select1 picker for modern browsers.

Constructor

new AutocompleteSelectpicker()

Source:

Extends

Members

(static) list :boolean

Source:
Type:
  • boolean

(static) selector :string

Source:
Type:
  • string

(readonly) downloadButtonHtml :Element

Source:
Inherited From:

Returns a HTML document fragment for a download button.

Type:
  • Element

(readonly) originalInputValue :*

Source:
Overrides:

Obtains the value from the original form control the widget is instantiated on. This form control is often hidden by the widget.

Type:
  • *

(readonly) props :object

Source:
Inherited From:

Returns widget properties. May need to be extended.

Type:
  • object

(readonly) resetButtonHtml :Element

Source:
Inherited From:

Returns a HTML document fragment for a reset button.

Type:
  • Element

(readonly) value :*

Source:
Overrides:

Obtains the value from the current widget state. Should be overridden.

Type:
  • *

Methods

_findLabel(value) → {string}

Source:
Parameters:
Name Type Description
value string

option value

Returns:

label

Type
string

_findValue(label) → {string}

Source:
Parameters:
Name Type Description
label string

label value

Returns:

value

Type
string

_getProps() → {object}

Source:
Inherited From:

Not meant to be overridden, but could be. Recommend to extend get props() instead.

Returns:

props object

Type
object

_init()

Source:
Overrides:

Meant to be overridden, but automatically called.

_setFakeInputListener()

Source:

Sets fake input listener

_setFocusListener()

Source:

Handles focus listener

_showCurrentLabel()

Source:

Displays current label

disable()

Source:
Overrides:

Disables widget

enable()

Source:
Overrides:

Enables widget

update()

Source:
Overrides:

Updates widget

There are 3 scenarios for which method is called:

  1. The options change (dynamic itemset)
  2. The language changed. (just this._showCurrentLabel() would be more efficient)
  3. The value of the underlying original input changed due a calculation. (same as #2?)

For now we just dumbly reinstantiate it (including the polyfill).