Replies: 2 comments 15 replies
-
Hi @A-she-ton. I couldn't reproduce any of your errors but I've attempted to fix this in #136. If you update the nuget packages to 0.5.2.0 and try this version I would be interested to see if it fixes it for you. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Thanks for the detailed response. Can you please try the pre-release version 0.5.2.2-alpha from nuget? I would also suggest clearing your cache or running in incognito and that should get rid of the errors you're having from the WindowEventsService. |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello again!
I previously mentioned in a separate discussion that I was having some async issues around the disposing of the
Datasheet
component.I have the
Datasheet
displaying on one page, but it's possible to navigate to another page while the initial page is still loading. In the event that navigation occurs, I'm usingCancellationTokenSource
andIDipose.Dispose()
in hopes of doing proper cleanup of resources. However, when debugging, I've noticed that even after I've attempted to dispose of theDatasheet
component, theOnAfterRenderAsync()
method still continues execution, resulting in several exceptions as various resources have been removed by this point.Here are some examples where the
OnAfterRenderAsync()
continues to execute and results in exceptions:I've seen exceptions surrounding the following:
BlazorDatasheet.Renderer.Headings.ColumnHeadingRenderer.OnAfterRenderAsync()
->BlazorDatasheet.Services.WindowEventService.RegisterMouseEvent()
BlazorDatasheet.Menu.SheetMenuTarget.OnAfterRenderAsync()
->Microsoft.JSInterop.JSRuntime.InvokeAsync()
BlazorDatasheet.Datasheet.OnAfterRenderAsync()
->BlazorDatasheet.Services.SheetPointerInputService.Init()
BlazorDatasheet.Menu.SheetMenu.OnAfterRenderAsync()
->BlazorDatasheet.Services.MenuService.RegisterMenu()
I noticed that the
Datasheet
component used to implement theDispose
method, but it appears to have been removed/refactored in this commit: 87c51ed#diff-ff4473cd595899241346035c252c1b9bb3a08b543ec315405b6a3a9b3fa25161L831Would it be possible to add the
Dispose
method back to theDatasheet
to ensure that it properly disposes of all resources/stops executing async tasks that are no longer needed?I'm not sure if this will help, but here is what I'm currently doing to try to dispose of the
Datasheet
:If this doesn't make sense, please let me know and I'll attempt to clarify further.
Thank you in advance. :)
Beta Was this translation helpful? Give feedback.
All reactions