diff --git a/src/ScadaLink.CentralUI/Components/Pages/Audit/AuditLogPage.razor.cs b/src/ScadaLink.CentralUI/Components/Pages/Audit/AuditLogPage.razor.cs
index 2aeb593..b7c7a5c 100644
--- a/src/ScadaLink.CentralUI/Components/Pages/Audit/AuditLogPage.razor.cs
+++ b/src/ScadaLink.CentralUI/Components/Pages/Audit/AuditLogPage.razor.cs
@@ -66,14 +66,19 @@ public partial class AuditLogPage : IDisposable
/// navigates to /audit/log?executionId=…). Reassigning
/// to a fresh instance is what kicks the results
/// grid into reloading; we also close the drawer so the operator sees the
- /// newly filtered grid, and call
- /// because this fires outside the normal render lifecycle.
+ /// newly filtered grid. The body is marshalled through
+ /// because
+ /// can fire off the renderer's
+ /// synchronization context.
///
private void HandleLocationChanged(object? sender, LocationChangedEventArgs e)
{
- ApplyQueryStringFilters();
- _drawerOpen = false;
- StateHasChanged();
+ _ = InvokeAsync(() =>
+ {
+ ApplyQueryStringFilters();
+ _drawerOpen = false;
+ StateHasChanged();
+ });
}
public void Dispose()
@@ -86,6 +91,10 @@ public partial class AuditLogPage : IDisposable
var uri = Navigation.ToAbsoluteUri(Navigation.Uri);
var query = QueryHelpers.ParseQuery(uri.Query);
+ // A paramless navigation (e.g. clicking the "Audit Log" nav link while
+ // already here) intentionally preserves the last applied filter rather
+ // than clearing the grid: this method is a drill-in mechanism and every
+ // drill-in carries query params. The operator clears via the filter bar.
if (query.Count == 0)
{
return;