change
Description
fires when the state of a radio button is checkedParameters
- value - (boolean) the state of a radio
- inputValue - (any) input value associated with the radio
Example
<script>
function handleChange(ev) {
const newState = ev;
console.log(newState);
// => {value: true, inputValue: 'Option 1'}
}
</script>
<Radio label="Checkbox" inputValue="Option 1" onchange={handleChange}/>
Details
The handler function receives an object with the state of a checkbox and its value.
Related article: Catching the change of a checkbox state