RadzenNumeric rendering issue with nullable values

Hi, when programatically setting a value to null, sometimes the RadzenNumeric component will not refresh properly (e.g. 9.00 will be shown as 9 even though the value is null).

To reproduce:

<div class="rz-p-12 rz-text-align-center">
    <RadzenNumeric TValue="decimal?" Format="N2" @bind-Value=@value InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "enter value" }})" />
</div>

<RadzenButton Text="Click me" Click="@(()=>value = null)"/>

    <RadzenText Text="@($"Current value is {value}")" />

@code{
    decimal? value = 9m;
}

On the first try this will work, i.e. clicking the button will reset the value to null and nothing will be shown in the RadzenNumeric. But try again setting and resetting a value, e.g. to 9 --> value will still be shown even though it is null.

Any ideas? I also tried calling StateChanged but it makes no difference.

I was able to replicate the problem and we will do our best to include fix in our next update early next week.

1 Like