Expand icon appears for a menu item even when all its children are hidden
- 主要语言
- TypeScript
- 星标
- 8.1k
- 派生
- 1.5k
- PR 合并指标
- 30 天内没有已合并 PR
描述
### 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",
```
贡献指南
评估
这个 Issue 还没有评估数据。