Skip to main content

change

Description

fires when a new value is selected in the control

Parameters

The callback of the event takes an object with the following parameter:

  • value - (string) an id of the newly selected option or "" if the value is cleared

Example

<script>
function handleChange({value}) {
console.log(value);
// id of a new selected option
}
</script>

<Select options={dataset} onchange={handleChange}/>

Details

The handler function receives an object with an id of the newly selected option.

Related article: Catching the change of selected option