Blazored / Modal

A powerful and customizable modal implementation for Blazor applications.
https://blazored.github.io/Modal/
MIT License
775 stars 185 forks source link

[Bug] .Net 8 Blazored Auto rendering #568

Open Shique opened 6 months ago

Shique commented 6 months ago

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?

chrissainty commented 6 months ago

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.

reiluke commented 2 weeks ago

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