Skip to main content

onchange

Description

Fires when a new value is selected in a multicombo

Usage

onchange?: (ev: { value: (string | number)[] }) => void;

Parameters

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

  • value - an array with the previously and newly selected options' ids

Example

<script>
function handleChange({value}) {
console.log(value);
// =>[101,104]
}
</script>

<MultiCombo options={users} onchange={handleChange}/>

Details

The handler function receives an object with an array of the previously and newly selected options' ids.

Related article: Catching the change of selected options