-
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.i am trying to use a modal (the modal is within BootsrapBlazor.Components.Modal) in a component within a component, so the modal is 2 layers deep. Because of this the modal starts to experience issues i think because its too deep. using the BlazorPortals project fixes the modal by rendering it to a parent component, but that is a depricated project... Describe the solution you'd likebecause of these issues it would be really cool to see some kind of a portal implementation in BootstrapBlazor. But while there isnt one ill be using the depricated library for now... Additional contextI can post code of an example of putting a modal 2 child components deep, but it should be easy to reproduce... |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 2 replies
-
@celadaris Thank you for contacting us. We will give feedback later. |
Beta Was this translation helpful? Give feedback.
-
@celadaris hi thanks for you contacting us. please submit the mini-repo-project for this issue. let us to known the |
Beta Was this translation helpful? Give feedback.
-
My apologies, after doing extensive amounts of testing i found that my issue only appears when im using DockView version 8.1.1 when upgrading to DockView version 8.1.3 it seems to fix the bug. i kind of mislead you into thinking it happens when the modal is a child of a child and its two layers deep but that was an incorrect cause of the bug, the bug actually happens when you launch a modal inside a DockViewV2 because the bug is fixed when upgrading to the latest version this repo displays the bug this repo is a fix using portals (not recommended) |
Beta Was this translation helpful? Give feedback.
-
hate to reopen this, but... when popping out the DockViewComponent and attempting to open the modal, the bug appears, I have uploaded two new repo's they are slightly modified from the last ones. this repo displays the bug this repo is a fix using portals (not recommended) 2024-09-10.14-38-22.mp4 |
Beta Was this translation helpful? Give feedback.
-
@celadaris got. let us resolve this issue. thank you report this |
Beta Was this translation helpful? Give feedback.
-
iShot_2024-09-11_08.53.55.mp4use please download this demo and try it. please let us know if you have any questions. |
Beta Was this translation helpful? Give feedback.
-
It's not clear how one can use DialogService in a way that avoids having to deal with reading code as a string, and its unclear if it's possible to use advanced features like javascript interop/blazorSSR. As an alternative I've found out that blazor natively supports the idea of a Portal, but its called Section I think ill stick to this because I wont have to depend on deprecated libraries, ill have clean code, and creating modals with advanced features and a lot of html is the same workflow as anything else. this repo is a fix using |
Beta Was this translation helpful? Give feedback.
-
you can get some information from https://www.blazor.zone/dialog-service
|
Beta Was this translation helpful? Give feedback.
DialogService
is a very powerful component and is a must-know point.you can get some information from
https://www.blazor.zone/dialog-service
https://www.blazor.zone/dialog
SectionContent
is an alternative way. Modal and Dialog have different design purposes. Modal is rendered when the page is rendered. Dialog is rendered dynamically.DialogOption.BodyTemplate
andDialogOption.Component
two parameters can adapt to all situations. You can dynamically render any component usingBootstrapDynamicComponent.CreateComponent
static method