-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
As working with the DOM in Blazor has its limitations, what is the current recommendation for displaying popups like dialogs at specific positions on the page?
For example, showing a window/dialog on a button click inside a Blazor component requires the popup element to be appended to a specific element (let's say the body) in order to be displayed over all other elements on the page. However, there is also the case for showing a popup inside another popup, so basically the position might be determined based on certain conditions.
One way to solve this might be to render a "special" element by using the idea of @(await Html.RenderComponentAsync<App>()) and then use JS interop to manually move elements from their original position to the desired one. However, this will probably break the diffing algorithm.
Are there any better ways to handle this?