TagHelperSamples icon indicating copy to clipboard operation
TagHelperSamples copied to clipboard

text-entry throws System.NullReferenceException when For value is null

Open b0bi79 opened this issue 4 years ago • 0 comments

My template is:

@model NSysWebTest.Web.ViewModels.Products.ProductCategoryViewModel
<text-entry id="Name" label-text="Name" for="Name"></text-entry>
<text-entry id="Note" label-text="Note" for="Note"></text-entry>

Template model ProductCategoryViewModel is

new ProductCategoryViewModel{
    Name = "Test",
    Note = null
};

I'm getting an error System.NullReferenceException while rendering a template on a line with Note

b0bi79 avatar May 21 '20 17:05 b0bi79