apexcharts / Blazor-ApexCharts

A blazor wrapper for ApexCharts.js
https://apexcharts.github.io/Blazor-ApexCharts
MIT License
749 stars 88 forks source link

Custom Icons and .Net 8 #476

Open mdhampton opened 3 weeks ago

mdhampton commented 3 weeks ago

Application: Server Side Blazor application.

So I had to add custom icons via Chart.Toolbar.Tool.CustomIcons. They were working under .net 7, but I recently manually migrated the project to .net 8. The custom icons are showing just fine, but nothing happens when I click. It seems that the call is dispatched to options.config.dotNetObject.invokeMethodAsync('JSCustomIconClick', 'bd86efd1f8fc42ea9a23d1792909d590'); just fine, and goes all the way through to this._pendingAsyncCalls[o] = { resolve: e, reject: t } in blazor.server.js. It just doesn't seem to get back to .Net. breakpoints in the code for the click method never get hit.

Has anyone seen this? I manually added @rendermode InteractiveServer to the pages. I'm just wondering if I broke something somehow in program.cs. I know when I tried to use MapRazorComponents that that completely broke MudBlazor.

Sadly, I created a new .Net 8 blazor server application, and the buttons work, so I am assuming that I broke something. Are any of the calls to MudBlazor in program.cs order dependent (e.g. when using app.UseAntiforgery, the call must appear after app.UseRouting and after any calls to UseAuthentication and UseAuthorization)?