-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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(sidenav): emit event when backdrop is clicked #1638
feat(sidenav): emit event when backdrop is clicked #1638
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
1 similar comment
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
I resigned the CLA for my additional email address. |
CLAs look good, thanks! |
1 similar comment
CLAs look good, thanks! |
22ee99f
to
14e71c2
Compare
Rebased onto current master branch to get alpha-10 goodness and resolve a merge conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this took so long, wasn't sure if we wanted to do this or go with a larger rewrite of the sidenav.
@@ -398,6 +401,8 @@ export class MdSidenavLayout implements AfterContentInit { | |||
} | |||
|
|||
_closeModalSidenav() { | |||
this.onBackdropClicked.emit(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to pass null, can just call emit()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, looks like that parameter was made optional in Angular 2 RC5.
Done
@@ -398,6 +401,8 @@ export class MdSidenavLayout implements AfterContentInit { | |||
} | |||
|
|||
_closeModalSidenav() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would create a new method _onBackdropClicked that emits and then calls this, we will probably add other bindings that call this function later (e.g. esc key).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This allows clients to distinguish between close events caused by calling close() and those caused by the backdrop being clicked. Closes angular#1427
14e71c2
to
8353609
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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. |
This allows clients to distinguish between close events caused by calling close() and those caused by the backdrop being clicked.
Closes #1427