Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.04 KB

CUSTOM_TRIGGERS.md

File metadata and controls

45 lines (30 loc) · 1.04 KB

Select.js - Binding Options - Custom Triggers:

Below is a list of all the custom triggers supported in the "data-select-options" binding attribute for DOM elements.

For Rendering:

options.onRenderComplete( element ):

Fires when the rendering for a a DOM element is complete.
Parameter: element: 'object' - The DOM element that was rendered.


For Item Selections:

options.onSelectedItemsChanged( values ):

Fires when the selected items have changed.
Parameter: values: 'string[]' - The values that have been selected.


For Drop-Down Showing/Hiding:

options.onDropDownShow():

Fires when the drop-down menu is shown.

options.onDropDownHide():

Fires when the drop-down menu is hidden.


Binding Example:

<select multiple="multiple" data-select-options="{ 'onRenderComplete': yourJsFunction }">
    <option value="1" selected="selected">Value 1</option>
    <option value="2">Value 2</option>
    <option value="2">Value 3</option>
</select>