Events in Blazor TextArea Component
23 Jul 20242 minutes to read
This section describes the TextArea events that will be triggered when appropriate actions are performed. The following events are available in the TextArea component.
Created event
The TextArea component triggers the Created event when the TextArea component is created. This event provides users with an opportunity to perform actions immediately after the TextArea has been created and initialized.
@using Syncfusion.Blazor.Inputs
<SfTextArea Created="@CreatedHandler"></SfTextArea>
@code {
private void CreatedHandler()
{
// Here you can customize your code
}
}
Input event
The TextArea component triggers the Input each time when the value of TextArea has changed. This event provides users with an opportunity to perform actions in response to real-time changes in the TextArea’s content.
The TextAreaInputEventArgs passed as an event argument provides the details about the input event in the TextArea.
@using Syncfusion.Blazor.Inputs
<SfTextArea Input="@InputHandler"></SfTextArea>
@code {
private void InputHandler(TextAreaInputEventArgs args)
{
// Here you can customize your code
}
}
ValueChange event
The TextArea component triggers the ValueChange event when the content of TextArea has changed and gets focus-out. This event provides users with an opportunity to execute specific actions in response to changes made by the user.
The TextAreaValueChangeEventArgs passed as an event argument provides the details about the changes in the TextArea’s value.
@using Syncfusion.Blazor.Inputs
<SfTextArea ValueChange="@ChangeHandler"></SfTextArea>
@code {
private void ChangeHandler(TextAreaValueChangeEventArgs args)
{
// Here you can customize your code
}
}
Focus event
The TextArea component triggers the Focus when the TextArea gains focus. This event allows developers to execute specific actions when the user interacts with the TextArea by focusing on it.
The TextAreaFocusInEventArgs passed as an argument provides details about the focus event in the TextArea.
@using Syncfusion.Blazor.Inputs
<SfTextArea Focus="@FocusHandler"></SfTextArea>
@code {
private void FocusHandler(TextAreaFocusInEventArgs args)
{
// Here you can customize your code
}
}
Blur event
The TextArea component triggers the Blur when the TextArea loses focus. This event allows users to execute specific actions when the user interacts with the TextArea by moving focus away from it.
The TextAreaFocusOutEventArgs passed as an argument provides details about the blur event in the TextArea.
@using Syncfusion.Blazor.Inputs
<SfTextArea Blur="@BlurHandler"></SfTextArea>
@code {
private void BlurHandler(TextAreaFocusOutEventArgs args)
{
// Here you can customize your code
}
}
Destroyed event
The TextArea component triggers the Destroyed when the TextArea component is destroyed.
@using Syncfusion.Blazor.Inputs
<SfTextArea Destroyed="@DestroyedHandler"></SfTextArea>
@code {
private void DestroyedHandler()
{
// Here you can customize your code
}
}