Events
This article explains the events available in the Telerik Rating for Blazor:
- ValueChanged - fires when the user selects an item (icon).
ValueChanged
The ValueChanged
event fires when the user clicks an item or uses the keyboard to select it.
Make sure to update the currently selected item when using the event.
<TelerikRating Value="@Value"
ValueChanged="@((double newRating) => ValueChangedHandler(newRating))">
</TelerikRating>
@code {
private double Value { get; set; } = 1;
private void ValueChangedHandler(double newRating)
{
Value = newRating;
}
}
The event is an
EventCallback
. It can be synchronous and returnvoid
, or asynchronous and returnasync Task
. Do not useasync void
.