Skip to content

DropdownComponent.onChange method

DropdownComponent › onChange

Official

Set the callback function to be called when the dropdown value changes.

Signature:

onChange(callback: (value: string) => unknown): this

Parameters:

Parameter Type Description
callback (value: string) => unknown The callback function.

Returns: thisThe dropdown component.

Since: 0.9.7

Example:

dropdown.onChange((value) => console.log(value));