Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.07 KB

CUSTOM_TRIGGERS.md

File metadata and controls

45 lines (30 loc) · 1.07 KB

Select.js - Binding Options - Custom Triggers:

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

For Rendering:

options.events.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.events.onSelectedItemsChanged( values ):

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


For Drop-Down Showing/Hiding:

options.events.onDropDownShow():

Fires when the drop-down menu is shown.

options.events.onDropDownHide():

Fires when the drop-down menu is hidden.


Binding Example:

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