using 2 p-dialog at same time and bring front clicked dialog
I'm submitting a ...
[ ] bug report => Search github for a similar issue or PR before submitting
[x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Hi, for some reason i need to open two p-dialog at same time. Second opened dialog being in front of first opened dialog., but i want to bring first dialog in front or vice versa. I couldn't see such a feature for to bring dialog front when click on it by adding a click function to header i managed to bring first dialog in front, but this time i can only make a click on title characters. So is there any way to trigger a function by clicking on whole header area, or bring the dialog to front when clicking on any part of it?
<p-header >
<span (click)="bringFront()"> dialog title </span>
</p-header>
component.visible = false;
setTimeout(() => {
component.visible = true;
}, 100);
There's no build in feature for this from a quick glance (but it might be nice).
Here's a really quick example of how to make it work - https://stackblitz.com/edit/github-kcmdhv?file=src/app/app.component.html
Alternatively I imagine you could manage the z-index of the dialogs turning autoZIndex off and using baseZIndex.
Thanks , this example help me alot.
Can you keep the issue open? It would be nice if they built in a toggle that would automatically do this for you.
It was automatically done before but causing so many other issues, one solution is using modal dialogs, other is increasing the dialog z-index yourself. My colleague will provide a sample.