Skip to content

AbstractTextComponent.onChange method

AbstractTextComponent › onChange

Official

Sets the callback to handle when the value of the input element changes.

Signature:

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

Parameters:

Parameter Type Description
callback (value: string) => unknown The callback to handle when the value of the input element changes.

Returns: thisThe text component.

Since: 0.9.7

Example:

textComponent.onChange((value) => {
console.log(value);
});