if (propertyType == typeof(double)){
<RadzenNumeric @ref=inputDoubleForFocus Placeholder="@Localize["Edit"]" @bind-Value=@doubleValue TValue="double" />
}
else if (propertyType == typeof(double?)){
<RadzenNumeric @ref=inputDoubleNullForFocus Placeholder="@Localize["Edit"]" @bind-Value=@doubleValueNullable TValue="double?" />
}
private RadzenNumeric<double> inputDoubleForFocus;
private RadzenNumeric<double?> inputDoubleNullForFocus;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
if (inputDoubleForFocus != null)
await inputDoubleForFocus.FocusAsync();
if(inputDoubleNullForFocus != null)
await inputDoubleNullForFocus.Element.FocusAsync();
}
}
The focusAsync function is working for the RadzenNumeric input filled with a Double type. But it does not work if the value is a Nullable Double