[Dialog] how do I render dialog close to the element where the trigger is ? #1875
-
Hi, I am following the pattern here where I have the dialog to appear inside a containing div. The example for Custom portal container works and dialog is contained inside the parent component. I would like to add another effect like this i.e. display where the trigger was. Is there a native functionality ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @yuvigrg, You are talking about However, that will have an impact on visual layering. You may come across z-index issues that are difficult to get out of. |
Beta Was this translation helpful? Give feedback.
Hey @yuvigrg,
You are talking about
Dialog
but the screenshot showsDropdownMenu
so it's a little confusing.However, if what you are after is for the content not to be portalled away from its natural location in the DOM, simply don't use the
Portal
part and it will be rendered right next to the trigger in the DOM.However, that will have an impact on visual layering. You may come across z-index issues that are difficult to get out of.
But otherwise that's completely possible this way.