Blazored / Modal

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

[Bug] No Modal Dialog is opened #172

Closed DanielHWe closed 4 years ago

DanielHWe commented 4 years ago

Describe the bug In my project (BlazorWebAssembly) var messageForm = Modal.Show<NewGame>(); var result = await messageForm.Result; Does not open a Model dialog, there is no error, so I have no clue what is not working.

To Reproduce See https://github.com/DanielHWe/BlazorDiceGame/blob/master/Pages/Game.razor Steps to reproduce the behavior:

  1. Klick "New game"
  2. ShowModal() is executed

Expected behavior A Modal Dialog is opened

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

larsk2009 commented 4 years ago

Hi,

First of all, thank you for actually providing a very good reproduction of your problem. This greatly helps us find any issue, so thanks for that!

The reason it is not working is because there is no <BlazoredModal /> in your MainLayout.razor. See step 3 of the readme. When I added this to the code you provided, the modal shows.