From 406d3fcbbf86602bed7b7ddc88a88be5405ea34e Mon Sep 17 00:00:00 2001 From: Christian Dulu <147778626+cduluCNB@users.noreply.github.com> Date: Fri, 6 Sep 2024 01:09:48 -0700 Subject: [PATCH] [FluentInputBase] Force `EditContext` to be re-associated with the Dispatcher (#2620) Co-authored-by: Vincent Baaij --- src/Core/Components/Base/FluentInputBase.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Core/Components/Base/FluentInputBase.cs b/src/Core/Components/Base/FluentInputBase.cs index c5619d5e4e..bf872b7198 100644 --- a/src/Core/Components/Base/FluentInputBase.cs +++ b/src/Core/Components/Base/FluentInputBase.cs @@ -171,7 +171,8 @@ protected async Task SetCurrentValueAsync(TValue? value) } if (FieldBound) { - EditContext?.NotifyFieldChanged(FieldIdentifier); + // Thread Safety: Force `EditContext` to be re-associated with the Dispatcher + await InvokeAsync(() => EditContext?.NotifyFieldChanged(FieldIdentifier)); } }