Replies: 2 comments 1 reply
-
By the way this is what BoldReports said about the sample project when they dug in: |
Beta Was this translation helpful? Give feedback.
1 reply
-
Integrating JavaScript with Blazor can be very challenging. |
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
-
My OnAfterRender is getting called multiple times and this is causing issues with several javascript libraries working properly including BoldReports, Syncfusion and FormIO. In the case of BoldReports and Syncfusion I opened tickets with them and provided sample module projects and heard back in one case that they were not exactly sure what is wrong but that it seemed like the components were getting created twice.
I found that at least on possible issue is related to the on after render being called multiple times. Tracing, it hit my trace 9 times. I have some code that looks for first render = false and some other conditions to reduce the number of calls but I still get at least 2 calls so then I had to try to put code in the javascript side to detect if my javascript object was already created for Bold/ForimIO etc. but that does not seem to be reliable for some reason.
I experimented with the settings in the admin dashboard in oqtane and tried setting it to interactive instead of static and to not prerender because it seems blazor pre-renders and calls on after render during that phase and then later when it renders the server interactive side. I confirmed by tracing that the mode is interactive at least. No difference.
I am including my resources within the specific razor page using new Resouce - I have tried including them in moduleinfo as well and that did not seem to matter. It seems like all the scripts and css are loading though.
Here are a couple sample modules, as stripped down as I could make them. I appreciate any suggestions you might have- especially if I am loading the resources properly, handling the on after render / js interop properly. I am having issues in a FormIO solution I am testing as well and it feels similar so I think if I can get it fixed in one I can fix it across the board.
https://github.com/SSzretter/SPSITECH.Module.Oqtane.BoldReports
https://github.com/SSzretter/SPSITECH.Module.SyncfusionNotifications
Beta Was this translation helpful? Give feedback.
All reactions