Discard in-memory changes when editing

This commit is contained in:
2025-12-26 10:04:37 -05:00
parent 77b5683804
commit 19a7164b8b
3 changed files with 21 additions and 3 deletions
+7 -1
View File
@@ -103,8 +103,14 @@
}
}
private void HandleCancel()
private async Task HandleCancel()
{
// Discard all in-memory changes by reloading from database
if (EventDefinition != null)
{
await context.Entry(EventDefinition).ReloadAsync();
}
_formChangeTracker?.AllowNavigation();
NavigationManager.NavigateTo("/events");
}