Skip to content

InputCheckbox does not set initial value #8502

@we4sz

Description

@we4sz

Describe the bug

When creating a InputCheckbox where value is true the checkbox is still unchecked.

To Reproduce

Steps to reproduce the behavior:

  1. Create a simple component
<EditForm Model="this">
    <h4>Checkbox</h4>
    <InputCheckbox bind-Value="@Visible"></InputCheckbox>
</EditForm>

@functions{
    [Parameter]
    protected bool Visible { get; set; } = true;
}

Expected behavior

The checkbox should be checked

Additional context

<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="0.9.0-preview3-19154-02" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.9.0-preview3-19154-02" PrivateAssets="all" />

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions