akveo / akveo/nebular

Expand icon appears for a menu item even when all its children are hidden

Open
#2,687 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8.1k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

### Issue type

**I'm submitting a ...**

* [x] bug report

### Issue description

**Current behavior:**
When defining menu items and setting all its children to hide, the expand icon is still displayed. Therefore, the menu item appears with the expand icon but when clicking on it, nothing occurs as all its children are hidden.

**Expected behavior:**
When an items has all its children hidden, the expand icon should not appear.

**Steps to reproduce:**
```typescript
items: NbMenuItem[] = [
{
title: 'Shopping Bag',
children: [
{
title: 'HiddenChildren',
hidden: true,
},
],
},
];
```

**Related code:**

[Reproduction using StackBlitz](https://github-hjy3jt.stackblitz.io)

```typescript
items = [
{
title: "Logout",
children: [
{
title: "HiddenChildren",
hidden: true,
}
]
}
];
```

### Other information:

**npm, node, OS, Browser**
```
Node: v12.21.0, npm: v12.21.0
OS: Linux (Ubuntu 20.04.2 LTS)
Browser: Firefox
```

**Angular, Nebular**
```json
"@akveo/ng2-completer": "^9.0.1",
"@angular/animations": "^11.0.9",
"@angular/cdk": "11.0.4",
"@angular/common": "^11.0.9",
"@angular/compiler": "^11.0.9",
"@angular/core": "^11.0.9",
"@angular/forms": "^11.0.9",
"@angular/platform-browser": "^11.0.9",
"@angular/platform-browser-dynamic": "^11.0.9",
"@angular/router": "^11.0.9",
"@nebular/theme": "7.0.0",
"@nebular/eva-icons": "7.0.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.