Closed asalvo closed 2 years ago
The original code basically hid what was an error. The UI should present based on actual state rather than what it assumes it is. I have fixed that in the demo, thanks!
@if (State.Value.IsLoading || State.Value.IsSaving || EditCustomerDto is null)
{
if (State.Value.IsLoading)
{
<h4>Loading...</h4>
}
else
{
<h4>Saving customer: @EditCustomerDto?.Id @EditCustomerDto?.Name</h4>
}
}
else
{
<EditForm Model=@EditCustomerDto>
The change implemented for #299 introduced a breaking change for my code.
If you run the ActionSubscriber tutorial, when you click the Edit button (to edit a customer), you will get an blazor error
unhandled exception rendering component: EditForm requires either a Model parameter, or an EditContext parameter, please provide one of these.
However the form data looks correct, and you can edit and save. This is exactly what is happening in my app, I get an error after my entity is loaded, but the form looks and functions OK.What I believe is happening is that: