Skip to main content

beforeChange

fires before selection of a new option

beforeChange: (ids: string | number | (string|number)[]) => boolean | void;

Parameters:

  • ids: string | number | array - required, the id(s) of a newly selected option(s)

Returns:

Return false to prevent selection of a new option(s); otherwise, true.

Example

combo.events.on("beforeChange", function(id){
// your logic here
return true;
});

Related sample: Combobox. Events

Change log:

added in v8.0