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

Freature Request: callback when backdrop is clicked for md-sidenav #1427

Closed
ianjoneill opened this issue Oct 5, 2016 · 2 comments · Fixed by #1638
Closed

Freature Request: callback when backdrop is clicked for md-sidenav #1427

ianjoneill opened this issue Oct 5, 2016 · 2 comments · Fixed by #1638
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix needs: discussion Further discussion with the team is needed before proceeding

Comments

@ianjoneill
Copy link
Contributor

Bug, feature request, or proposal:

Feature Request.

What is the expected behavior?

I would like to be called back when the overlay for md-sidenav is clicked.

What is the current behavior?

There is no callback available.

What are the steps to reproduce?

N/A

What is the use-case or motivation for changing an existing behavior?

I have a layout where I display a sub-pane using a sidenav. This is displayed in a router outlet within the sidenav component. Clicking a button on the main page changes the route and opens the sidenav to display an edit screen/popup. I want to be called back when the user clicks on the sidenav overlay, so that I can change the route back to the main page's route. Using the onCloseStart and onClose events on the sidenav itself is not really right for this.

Which versions of Angular, Material, OS, browsers are affected?

N/A

Is there anything else we should know?

I would be more than happy to put up a pull-request for this. I would like to ask the community whether they would want control via the callback whether the sidenav should close or not, or whether just an informational callback (e.g. event) to inform that sidenav will be closing is enough (the latter is fine for my use-case).

@jelbourn jelbourn added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Oct 5, 2016
@jelbourn jelbourn changed the title Freature Request: callback when overlay is clicked for md-sidenav Freature Request: callback when backdrop is clicked for md-sidenav Oct 19, 2016
@ianjoneill
Copy link
Contributor Author

I'll implement the simpler informational callback for now (as a simple event emitter on the md-sidenav-layout component) , as I haven't had anyone stating that they want control over whether the sidenav should close.

ianjoneill added a commit to ianjoneill/material2 that referenced this issue Oct 28, 2016
This allows clients to distinguish between close events caused by
calling close() and those caused by the backdrop being clicked.

Closes angular#1427
@jelbourn jelbourn added the has pr label Nov 4, 2016
ianjoneill added a commit to ianjoneill/material2 that referenced this issue Nov 10, 2016
This allows clients to distinguish between close events caused by
calling close() and those caused by the backdrop being clicked.

Closes angular#1427
ianjoneill added a commit to ianjoneill/material2 that referenced this issue Nov 29, 2016
This allows clients to distinguish between close events caused by
calling close() and those caused by the backdrop being clicked.

Closes angular#1427
tinayuangao pushed a commit that referenced this issue Dec 1, 2016
* feat(sidenav): emit event when backdrop is clicked

This allows clients to distinguish between close events caused by
calling close() and those caused by the backdrop being clicked.

Closes #1427

* Address review comments
@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 5, 2019
@mmalerba mmalerba added the needs: discussion Further discussion with the team is needed before proceeding label Mar 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix needs: discussion Further discussion with the team is needed before proceeding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants