[MatDialog] Expose OverlayRef
See original GitHub issuePlease describe the feature you would like to request.
Expose the variable _overlayRef
or provide a getter
What is the use-case or motivation for this proposal?
I’m currenty using the following in order to access the backdrop of the current overlay:
this.dialog.openDialogs.slice().shift()._overlayRef.backdropElement
Is there anything else we should know?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Overlay | Angular Material
The OverlayRef is a PortalOutlet - once created, content can be added by attaching a Portal . See the documentation on portals for...
Read more >Custom Overlays with Angular's CDK - Thoughtram Blog
Let's start simple and work our way up to the final, fully-fledged solution which will have a very similar API as the MatDialog...
Read more >How to bring a MatDialog to the front in an appropriate way?
getContainerElement().appendChild(overlayRef.hostElement);. It does the trick, however, it also makes dialog not responding. It looks like ...
Read more >3 Ways to Create a Modal Window With the Angular CDK
For this purpose, the Overlay instance has an exposed listener for clicks. Here the developer could enter special logic that either calls a...
Read more >Easy Dialogs with Angular Material
Now all we have to do is to use Angular Material's MatDialog service to create a ... This will return an OverlayRef instance...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We also have a use case where we need to change the
maxWidth
of the overlay (which is initially passed in through the dialog configuration) after the dialog has been opened. This is currently not exposed through the dialog ref.Thank you for submitting your feature request! Looks like during the polling process it didn’t collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular’s scope, we’d encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.