Discard in-memory changes when editing
This commit is contained in:
@@ -118,8 +118,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleCancel()
|
||||
private async Task HandleCancel()
|
||||
{
|
||||
// Discard all in-memory changes by reloading from database
|
||||
if (Team != null)
|
||||
{
|
||||
await Context.Entry(Team).ReloadAsync();
|
||||
}
|
||||
|
||||
_formChangeTracker?.AllowNavigation();
|
||||
NavigationManager.NavigateTo("/teams");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user