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(sidenav): open all sidenavs from MdSidenavContainer #2870

Merged
merged 1 commit into from
Apr 25, 2017

Conversation

EladBezalel
Copy link
Member

  • added open and close functions that applies to both sidenavs in the container and resolves when both are finished

fixes #2591

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 30, 2017
}

return Promise.all(promises);
}
Copy link
Member

Choose a reason for hiding this comment

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

Unit test?

@@ -367,6 +367,36 @@ export class MdSidenavContainer implements AfterContentInit {
this._validateDrawers();
}

/** Calls `open` of both start and end sidenavs */
public open() {
const promises: Promise<MdSidenavToggleResult>[] = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

can't this be simplified to:

return Promise.all([this._start, this._end].map((sidenav) => sidenav && sidenav.open()));

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks that's much simpler

@EladBezalel
Copy link
Member Author

@mmalerba @kara please rereview :)

- added `open` and `close` functions that applies to both sidenavs in the container and resolves when both are finished

fixes angular#2591
@jelbourn
Copy link
Member

@mmalerba is this merge-ready?

@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Apr 24, 2017
@mmalerba mmalerba merged commit 79306ad into angular:master Apr 25, 2017
@EladBezalel EladBezalel deleted the feat/multiple-sidenav-open branch April 26, 2017 01:50
@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.

Sidenav - provide means to open/close from non-child elements
4 participants