Replies: 1 comment
-
My problem was related to WASM being single-threaded. I found a hacky solution that gives the framework time to change the tab before it runs its UI blocking JSRuntime call, and thus gives me the expected result. public async Task RenderAsync()
{
IsLoading = true;
StateHasChanged();
await Task.Delay(100).ConfigureAwait(false); //Hack that fixes single-thread problem
await Task.Run(() => JsRuntime.InvokeVoidAsync("CytoscapeViewer.render", JsonSerializer.Serialize(EcosystemState.Value.CurrentEcosystem)).ConfigureAwait(false)).ConfigureAwait(false);
IsLoading = false;
StateHasChanged();
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@stsrki
When i use the following method with the
SelectedTabChanged
event :The tab is only changed after the Render is done. This is not what I want. I want the tab to change to the selected tab immediately and then run the render. How can I do this?
Beta Was this translation helpful? Give feedback.
All reactions