Loading, please wait...

A to Z Full Forms and Acronyms

Why does Blazor InputCheckbox not set an initial value?

This code will help you to understand Why Blazor InputCheckbox does not set an initial value

This issue is resolved in the Balzor 3.0.0 Preview 5 version.

<EditForm Model="this">
    <h4>Checkbox</h4>
    <InputCheckbox @bind-Value="@Visible"></InputCheckbox>
</EditForm>
@code {
    [Parameter]
    public bool Visible { get; set; } = true;
}

I would suggest you check the below link for better understanding:
https://github.com/aspnet/AspNetCore/issues/8502

 

A to Z Full Forms and Acronyms

Related Article