ToggleComponent.onChange method
ToggleComponent › onChange
Official
Handle the change event of the toggle.Signature:
onChange(callback: (value: boolean) => unknown): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| callback | (value: boolean) => unknown | The callback to handle the change event. |
Returns: this — The toggle.
Since: 0.9.7
Example:
toggle.onChange((value) => { console.log(value);});