akveo / akveo/nebular

Disconnect the context-menu when empty or null items

未关闭
#2,176 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
8.1k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

### Issue type

**I'm submitting a ...** (check one with "x")

* [ ] bug report
* [X] feature request

### Issue description

**Current behavior:**
When our nbContextMenu is empty (or null), we have to handle an ugly ngIf around that element. Potentially having twice the same tags, but just one with the [nbContextMenu] attribute and one without.

**Expected behavior:**
The nbContextMenu could simply disconnect the `dynamicOverlayHandler` when the item list is empty rather than calling a `validateItems`. That way we could support receiving the menuItems later or not having menuItems at all in some cases.

**Steps to reproduce:**
`[nbContextMenu]="null"` or `[nbContextMenu]="[]"` should just be handled. Nothing should show.

**Related code:**

### Other information:
**Angular, Nebular**
Angular: 8.2.14
Nebular: 4.6.0

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。