Congrats about new 18.2 EnableTriState checkbox, very useful.
In my opinion, if the binded property is set to null, the component should be rendered as Indeterminate and not as False.
To check it out, just run this code:
@using Syncfusion.Blazor.Buttons
<EditForm Model="Annotate">
<DataAnnotationsValidator></DataAnnotationsValidator>
<div class="form-group">
<SfCheckBox Label="Option 1"
TChecked="bool?"
EnableTriState="true"
@bind-Checked="@Annotate.Check"></SfCheckBox>
<ValidationMessage For="@(() => Annotate.Check)" />
</div>
<SfButton HtmlAttributes="@Submit" Content="Submit"></SfButton>
</EditForm>
@code {
public Annotation Annotate = new Annotation();
public class Annotation
{
[System.ComponentModel.DataAnnotations.Required(ErrorMessage = "Uhmmm! Not null, please.")]
public bool? Check { get; set; } = null;
}
public Dictionary<string, object> Submit = new Dictionary<string, object>()
{
{ "type", "submit"}
};
}
Because Check is set to null, in my opinion, it should be rendered as Indeterminate, but is looks like false:
