DavidVollmers / Ignis

The Blazor framework for building modern web applications.
https://ignis.dvolper.dev
MIT License
151 stars 9 forks source link

DialogOutlet doesn't work properly #60

Open ilajosmanov opened 2 months ago

ilajosmanov commented 2 months ago

Hi! Thank you so much for this library, very useful!

I've found some issue, when use <Dialog /> component wrapped by Transition. Dialog appears in the place where it was created but not inside DialogOutlet itself. Am I doing something wrong?

Code example:

// App.blazor

<DialogOutlet />
// SomeComponent.razor

<Transition>
  <Dialog />
</Transition>
DavidVollmers commented 2 months ago

Hi, thanks for using Ignis!

This might actually be a bug you encountered, I will have to test this properly.

Does it work for you if you render the transition as a Fragment like this:

<Transition AsComponent="typeof(Fragment)">
  <Dialog />
</Transition>
ilajosmanov commented 2 months ago

Sorry for confusion, but yes - my code looks like here: <Transition Appear="@Appear" Show="IsOpen" AsComponent="typeof(Fragment)" Context="_" /> it still doesn't work. Let me know if I can provide more details.

DavidVollmers commented 2 months ago

If you could provide an example repository where you reproduce this behavior it would be really helpful!

ilajosmanov commented 2 months ago

Don't worry! I could fix it. I put <DialogOutlet /> into component (like header for example) with @rendermode InteractiveAuto and then it works.

p.s If your app isn't InteractiveAuto globally, you shouldn't put it into <App.razor/>. I think, it should be added to the docs. (I'm new, so it wasn't so obvious). If you want - I can make a PR :)

DavidVollmers commented 2 months ago

Interesting! Thanks for the analysis. I will have a deeper look into this to understand exactly what the problem here is and then either fix it or document it as you described!