In the main MS Blazor docs there is an article Avoid rerendering after handling events without state changes
They give an example of using a button click - eg
<button @onclick="EventUtil.AsNonRenderingEventHandler<MouseEventArgs>(HandleClick3)">
Select me (Avoids Rerender and uses <code>MouseEventArgs</code>)
</button>
private void HandleClick3(MouseEventArgs args)
{
dt = DateTime.Now;
Logger.LogInformation(
"This event handler doesn't trigger a rerender. " +
"Mouse coordinates: {ScreenX}:{ScreenY}",
args.ScreenX, args.ScreenY);
}
How can this be applied to say the TelerikNumericTextBox ValueChanged event?
For example, the following gives errors
<TelerikNumericTextBox T="int" Value="@NumericTextBoxValue"
ValueChanged="EventUtil.AsNonRenderingEventHandler<int>(NumericTextBoxChangeHandler)"
Min="1" Max="120" Width="120px">
</TelerikNumericTextBox>
private void NumericTextBoxChangeHandler(int newValue)
{
Console.WriteLine($"newValue == {newValue}");
NumericTextBoxValue = newValue;
}
Is this possible in Telerik Blazor? Or is there another inbuilt mechanism to control which events automatically invokes StateHasChanged?