Skip to main content

onchange

Description

Fires when the checkboxes are selected

Usage

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

Parameters

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

  • value - (array) an array of ids of the selected checkboxes

Example

<script setup>
function handleChange({value}){
console.log(value);
}
</script>

<template>
<CheckboxGroup :onchange="handleChange"/>
</template>

Details

The handler function receives an object with an array of ids of the selected checkboxes.