Render a EnableTriState checkbox with a binded property to null

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 boolCheck { getset; } = null;
    }
    public Dictionary<stringobjectSubmit = new Dictionary<stringobject>()
    {
        { "type""submit"}
    };
}


Because  Check is set to null, in my opinion, it should be rendered as Indeterminate, but is looks like false:







2 Replies 1 reply marked as answer

MK Mohan Kumar Ramasamy Syncfusion Team July 20, 2020 08:20 AM UTC

Hi Dani, 
 
We have checked your reported issue and we would like to let you know that it is a known issue and we have already fixed it, and it will be available in our upcoming patch release. Until then we appreciate your patience. 
 
Regards, 
Mohankumar R 



MK Mohan Kumar Ramasamy Syncfusion Team July 21, 2020 01:00 PM UTC

Hi Dani, 
 
Thank you for the patience. 
 
We are glad to announce that our weekly patch release (18.2.0.46) is rolled out. We have included the fix for the reported issue in this release. So, we suggest you upgrade our Syncfusion packages to our latest version to resolve this issue in your end. (18.2.0.46) 
 
Please let us know if you need further assistance on this. 
 
Regards, 
Mohankumar R 


Marked as answer
Loader.
Up arrow icon