question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[MatDialog] Expose OverlayRef

See original GitHub issue

Please 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:open
  • Created 4 years ago
  • Reactions:3
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
HeathJaredcommented, Jun 17, 2021

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.

0reactions
angular-robot[bot]commented, Mar 13, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found