change
Description
fires when the state of the Two State button changesParameters
The callback of the event takes an object with the following parameter:
- value - (boolean) defines if the button is pressed ("true") or unpressed ("false")
Example
<script>
function handleChange({value}){
console.log(value);
}
</script>
<TwoState onchange={handleChange}/>
Details
The handler function receives an object with the button state which can be "true" or "false".
Related article: Catching the change of selected options