Conversation
…a ToastService to avoid exceptions ( vikramlearning#836 ).
Contributor
|
@Suiram1701 Thank you for the PR. I'll take care of this. |
shargon
approved these changes
May 17, 2025
shargon
reviewed
May 17, 2025
Contributor
|
Can this be merged in the next release? |
shargon
approved these changes
May 19, 2025
Contributor
|
Any update with this issue? |
Author
|
gvreddy04 asked for a minimal repo to reproduce the issue (what I've provided) but didn't respond yet. This issue was also mainly caused by me who didn't understand how at the time how to use async in Blazor. |
Author
|
@shargon I've read your issue and it has the same source as mine. A Blazor renderer is attached to a specific thread and to modify a component (in this case the Toasts I think) from a different thread you have to use the dispatcher with InvokeAsync. So try to call the toast service through |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ToastService.NotifyAsync(ToastMessage)suggested by @shargon