From 177d418ac3602d1b70504aa113283759bfa3ff91 Mon Sep 17 00:00:00 2001 From: OlgunR Date: Mon, 20 Apr 2026 12:59:27 +0200 Subject: [PATCH] Use InvokeAsync for async state updates in BandGridBase Replaced direct StateHasChanged() calls with InvokeAsync(StateHasChanged) to ensure asynchronous state updates. This helps prevent issues that can arise from synchronous state changes during component lifecycle events or event callbacks in Blazor. --- DbFirst.BlazorWebApp/Components/BandGridBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DbFirst.BlazorWebApp/Components/BandGridBase.cs b/DbFirst.BlazorWebApp/Components/BandGridBase.cs index c04cc7d..d3e7dbb 100644 --- a/DbFirst.BlazorWebApp/Components/BandGridBase.cs +++ b/DbFirst.BlazorWebApp/Components/BandGridBase.cs @@ -157,7 +157,7 @@ public abstract class BandGridBase : ComponentBase .Select(c => c.FieldName) .ToList(); } - StateHasChanged(); + _ = InvokeAsync(StateHasChanged); } protected void UpdateBandOptions()