-
Notifications
You must be signed in to change notification settings - Fork 55
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
Collapse and Expand VerticalNav through code #438
Comments
I don't have an issue making these methods public. However, I would like to first understand why you need to open/close the menu programmatically? |
The use case is to persist the NavBar state (collapsed/expanded) so the user won't need to collapse the NavBar every time the page reloads. |
I'm wondering if we can provide an attribute to set the initial state? We already use an internal property we could expose. Something like:
That way the menu renders collapsed instead of forcing it to close after briefly shown open? This would also allow the mobile state to override that. Or would you prefer to call the methods instead? |
That would do it. Thanks! |
I added a new showMenuCollapsed attribute. |
I was wondering if there's a way to collapse and expand the VerticalNav through the code. Right now it's only possible by clicking on humbugger menu.
I noticed there are two methods (expandMenu and CollapseMenu) but both are private:
patternfly-ng/src/app/navigation/vertical-navigation/vertical-navigation.component.ts
Line 629 in 7a1904b
Will be happy to send a PR if you're willing to make the methods public.
The text was updated successfully, but these errors were encountered: