akveo / akveo/ngx-admin

Side Menu Items with expanded set to true - Not working properly if Side menu is collapsed ***Reproducible on NGX-Admin-Demo***

Open
#5,589 0 comments 0 reactions 0 assignees View on GitHub
needs triage
Dominant language
TypeScript
Stars
25.7k
Forks
7.9k
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a ...

* [x] bug report
* [ ] feature request
* [ ] question about the decisions made in the repository

### Issue description

**Current behavior:**
I have a Side menu item with children that has expanded set to be true. If I hit the breakpoint to make the Side menu icons only the sub-menus collapse(this is expected). However, if I click a menu item, the side drawer comes out, and expanded becomes false and I can see the submenu close as though I clicked it to close.

**Expected behavior:**
If I expand the side menu from the Icon only breakpoint the submenus should stay open as they are not able to be seen while the side drawer is closed.

**Steps to reproduce:**

- Add a side menu item with children
- Set the parent with property expanded to true
- Make window side small enough so that side menu only shows icons
- Click the parent Menu Items icon

This is also reproducible on the ngx-admin-demo page.

- Collapse the menu
- Click the Layout Icon
- The drawer expands and closes the layout submenu

Here is the menu item with children
```
{
title: 'Members',
icon: 'people-outline',
expanded: true,
children: [
{
title: 'Managers',
link: 'managers',
},
{
title: 'Employees',
link: 'employees',
},
],
},
```

### Other information:

**npm, node, OS, Browser**

Node: 12.12.1
npm: 6.12.1
MacOS: Catalina 10.15.2
Browser: Chrome

**Angular, Nebular**

Angular: 8.2.14
Nebular: 4.6.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.