-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Trying to compact sidebar on item click not working #82
Comments
Hi @hriverahdez, could you please provide a complete reproducible example so that we can look into. |
Hi @nnixaa, I've set up a sample project at https://github.com/hriverahdez/sidebar-example.git in which I followed part of the installation process of nebular. Adding a custom theme configuration in the scss and using some of the styles available in the ngx-admin's header component (just cosmetics) |
Okay, I see the issue. The problem lies here https://github.com/akveo/nebular/blob/master/src/framework/theme/components/sidebar/sidebar.component.ts#L245 so that it expands the sidebar right after you collapse it :/ |
The timeout workaround might do the trick. Thanks. I'll leave it to you to close the issue since is not yet resolved. Might be nice to get an update on this matter, #23 is presenting a similar situation where the |
@hriverahdez let's close this one and track the issue in #23 then. |
I am using NbMenuService's onItemSelect method and subscribing to it. Then when an Item is clicked I am calling NbSidebarService's toggle function and passing in the sidebar's tag. It's not working. Oddly on the ngx-admin demo, the toggle menu icon on the header has a click handler that executes the same code to toggle the sidebar which I am now using and it works there.
This is the code I'm using. It lies on ngOnInit() of a component that encompases the whole app layout and that includes the sidebar on its template. Any idea why it's not working?
this.menuService.onItemSelect() .subscribe((event: {tag: string, item: any}) => { this.sidebarService.toggle(true, 'menu-sidebar'); });
The text was updated successfully, but these errors were encountered: