Skip to main content


In the usage documentation, a few callbacks are listed that allow you to listen to specific events. Callbacks aren't always ideal, though, specifically when you wish to have multiple handlers.

initializeInvoked once the control is completely initialized.
changevalueInvoked when the value of the control changes.
focusInvoked when the control gains focus.
blurInvoked when the control loses focus.
item_addvalue, itemInvoked when an item is added (i.e., when an option is selected)
item_removevalue, $itemInvoked when an item is deselected.
item_selectitemInvoked when an item is selected.
clearInvoked when the control is manually cleared via the clear() method.
option_addvalue, dataInvoked when a new option is added to the list of available options.
option_removevalueInvoked when an option is removed from the available options.
option_clearInvoked when all options are removed from the control.
optgroup_addid, dataInvoked when a new option is added to the list of available options.
optgroup_removeidInvoked when an option group is removed.
optgroup_clearInvoked when all option groups are removed.
dropdown_opendropdownInvoked when the dropdown opens.
dropdown_closedropdownInvoked when the dropdown closes.
typestrInvoked when the user types while filtering options.
loaddataInvoked when new options have been loaded and added to the control (via the load option or load API method).
destroyInvoked right before the control is destroyed.