Events in Rating Component
6 Jan 20231 minute to read
This section describes the rating events that will be triggered when appropriate actions are performed. The following events are available in the rating component.
Created
The rating component triggers the Created event when the rendering of the rating component is completed.
@using Syncfusion.Blazor.Inputs
<SfRating Created="Created"></SfRating>
@code{
public void Created()
{
// Here, you can customize your code.
}
}
ValueChanged
The rating component triggers the ValueChanged event when the value of the rating is changed. The changed value is passed as the event argument.
@using Syncfusion.Blazor.Inputs
<SfRating ValueChanged="ValueChanged"></SfRating>
@code{
public void ValueChanged(double args)
{
// Here, you can customize your code.
}
}
OnItemHover
The rating component triggers the OnItemHover event when the rating item is hovered. The RatingHoverEventArgs passed as an event argument provides the details of the hovered item.
@using Syncfusion.Blazor.Inputs
<SfRating OnItemHover="OnItemHovered"></SfRating>
@code{
public void OnItemHovered(RatingHoverEventArgs args)
{
// Here, you can customize your code.
}
}