-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hiding a MdDialog #5162
Comments
Have you tried binding it to some property of the component that is calling it? You can use an object (not a primitive type) and pass it to the dialog to initialize it ( |
Nice idea, I will try that. Thanks ! |
Binding inputs is not a problem. In my case the UI inside of dialog is, let's say "expensive", e.g. multiple interactive maps. Building the dialog content UI every time is not very effective, I would need just to hide or show it. |
Please increase the priority. I don't think this is minor. My dialog has expensive components inside (Google Maps) and every time the dialog is opened, the app progressively slows down, down to a crawl... |
@karol-depka, there is a "P3" duplicate at #6206. The official consensus seems to be:
It's open for community contribution if anyone cares to give it a shot! |
Much need feature , I have child components inside the dialog window , for with previous instance and values are needed , I would be better just to hide and open the dialog instead of passing the reference each time it opens dialog |
Chat-Bot Dialog/Popup is potential examples for this use case. |
@willshowell submited an already merged PR about this topic: #14772. |
Closing since |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Feature request
What is the expected behavior?
Ability to hide the MdDialog and then show it back, with the component inside of it not being changed.
What is the current behavior?
The component can only be closed, and the component inside is destroyed.
What are the steps to reproduce?
Open a dialog, change something inside it, close it, open it back, and see that the change is gone.
What is the use-case or motivation for changing an existing behavior?
For example with a form inside a MdDialog, resetting the form when the dialog is closed/hidden is very annoying.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.2.0-rc.2, Material 2.0.0-beta.6, any OS, any TypeScript version, any Browser
The text was updated successfully, but these errors were encountered: