Modal icon indicating copy to clipboard operation
Modal copied to clipboard

[Bug] .Net 8 Blazored Auto rendering

Open Shique opened this issue 11 months ago • 2 comments

Description Blazored Modal problems with the following configuration - Interactive render mode: Auto, Interactivity location: Per page/component in .Net 8

To Reproduce Create a new project with the following configuration, add Blazored Modal and try to get it working on the client components. image

Expected behavior Blazored Modal working with Blazor Auto rendering mode.

Additional context

If you set interactive mode to Auto where rendering happens on both the server and the client, then the modal is not working. I believe this is due to the fact that the CascadingBlazoredModal is rendered on the server when encapsulating the Routes component. This leaves the client without the CascadingBlazoredModal. I can't find anywhere else where I can wrap the CascadingBlazoredModal to make it cascade to all client components. I've managed a workaround where I've disabled pre-rendering and moved the Routes component to the client, but this has in effect removed the Auto settings and changed it to WebAssembly. Is there a way to have this working without moving to WebAssembly only?

Shique avatar Mar 08 '24 13:03 Shique

Thanks for raising this @Shique. I believe you are correct. The new render modes have broken a lot of things for people including how this library works.

Right now I believe I need a redesign of the package to make this scenario work.

chrissainty avatar Mar 14 '24 19:03 chrissainty

anyone have alternative ? because we cannot migrate as we have used blazor modal for a big project

reiluke avatar Sep 16 '24 08:09 reiluke