Blazored / Modal

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

[Bug] Instruction on the getting started page does not result in a working setup #561

Closed zwrawr closed 8 months ago

zwrawr commented 8 months ago

I'm probably just missing something but,

Describe the bug. Instruction on the getting started page does not result in a working setup.

To Reproduce Steps to reproduce the behavior:

  1. Create a new "Blazor Web App" with .Net 8.0
  2. Follow the getting started on blazored.github.io
  3. I also took the confirm modal from this repo for testing
  4. Run the program and click the buttons
  5. Nothing happens

Expected behavior The getting started should produce a working system on the recommend project type for .Net 8.0

If applicable, add screenshots to help explain your problem.

Hosting Model (is this issue happening with a certain hosting model?):

Additional context See repo zwrawr/blazorBlazoredModaltest

The webapp template has pages across both SSR and WASM rendering, which makes this a little complicated.

chrissainty commented 8 months ago

This is a common issue with the new .NET 8 templates. In this file https://github.com/zwrawr/blazorBlazoredModalTest/blob/main/blazorBlazoredModal/Components/App.razor you need to add @rendermode="InteractiveServer/InteractiveWebAssembly" to the HeadOutlet and Routes components other wise the app is only server-side rendered.

See the app in the samples folder for an example (https://github.com/Blazored/Modal/blob/main/samples/InteractiveServer/Components/App.razor)

zwrawr commented 8 months ago

Thanks.

The comment still stands

The getting started should produce a working system on the recommend project type for .Net 8.0