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 setup>
function handleChange({value}) {
console.log(value);
// =>[101,104]
}
</script>

<template>
<MultiCombo :options="users" :onchange="handleChange"/>
</template>

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