Skip to main content

onchange

Description

Fires when radio buttons are checked

Usage

onchange?: (event: { 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 radio buttons

Example

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

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

Details

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