Skip to content
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

feat(dialog): allow disableClose option to be updated #4964

Merged

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jun 4, 2017

  • Exposes the disableClose option via the MdDialogRef and allows for it to be updated.
  • Makes the containerInstance private to MdDialogRef since it doesn't make sense for it to be public anymore.
  • Completes the backdropClick observable once the associated overlayRef is destroyed. This avoids having to unsubscribe manually or having to use Observable.first.

Fixes #3938.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 4, 2017
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being able to update disableClose with this API is somewhat problematic because it means that some config properties can be updated live but other can't (e.g., position, size). This should be consistent one way or the other.

I would change the approach to add disableClose as a property to the dialog ref which is initially set from the config but can be subsequently updated.

@crisbeto crisbeto force-pushed the 3938/dialog-dynamic-disable-close branch from 42a11e9 to 6506b10 Compare June 5, 2017 19:33
@crisbeto
Copy link
Member Author

crisbeto commented Jun 5, 2017

Addressed the feedback @jelbourn.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just needs rebease

@crisbeto crisbeto force-pushed the 3938/dialog-dynamic-disable-close branch from 6506b10 to 7e1bb72 Compare June 6, 2017 17:28
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Jun 6, 2017
@andrewseguin andrewseguin added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Jun 7, 2017
@andrewseguin
Copy link
Contributor

Needs rebase =)

* Exposes the disableClose option via the `MdDialogRef` and allows for it to be updated.
* Makes the `containerInstance` private to `MdDialogRef` since it doesn't make sense for it to be public anymore.
* Completes the `backdropClick` observable once the associated `overlayRef` is destroyed. This avoids having to unsubscribe manually or having to use `Observable.first`.

Fixes angular#3938.
@crisbeto crisbeto force-pushed the 3938/dialog-dynamic-disable-close branch from 7e1bb72 to 656c1fa Compare June 8, 2017 17:21
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Jun 8, 2017
@andrewseguin andrewseguin merged commit 66629cf into angular:master Jun 8, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow changing of disableClose property for dialog while dialog is open
4 participants