Error: System.InvalidOperationException: The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering or component state

ykl
ykl
Member
242 Points
13 Posts

How to fix following error?

Error: System.InvalidOperationException: The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering or component state.
   at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
Views: 98
Total Answered: 1
Total Marked As Answer: 0
Posted On: 24-May-2024 02:26

Share:   fb twitter linkedin
Answers
dev3
dev3
Member
140 Points
2 Posts
         

Try following:

this.InvokeAsync(() => this.StateHasChanged());
Posted On: 24-May-2024 23:06
 Log In to Chat