Closed mrpmorris closed 4 years ago
@mrpmorris thanks for contacting us.
I believe this is due to the IsFixed=true you have in your cascading value. That will make it available but will not trigger any updates to it. In the EditForm case the value gets updated and triggers a parameter update.
@SteveSandersonMS Is this correct?
The EditForm also uses IsFixed=true.
However, it seems that the EditForm recreates all of its child content by using OpenRegion(EditContext.GetHashCode) - so when the EditContext changes the region's sequence ID changes - resulting in controls being destroyed and recreated.
I'll close this issue.
Thanks
Describe the bug
Components within an EditForm are destroyed/recreated whenever the Model changes, but this does not happen in my own custom component.
To Reproduce
Alter Index.razor
In /Shared create NotAnEditForm.razor
In /Shared create InputText2.cs
Run the app and click the "Create new" button. The date of the InputText2 component within the EditForm is updated, therefore it is being recreated, but the InputText2 component within the NotAnEditForm remains unaltered.