akveo / akveo/nebular

feature request: control expanded menu items

Abierto
#2,266 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
8.1k
Forks
1.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Issue type

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

* [ ] bug report
* [x] feature request

### Issue description

**Current behavior:**
`NbMenuComponent`accepts an array of `NbMenuItem`. Some of these items can have children (subitems) and I can control their default `expanded` state. The problem is that there is no way to listen on clicks on these items and programatically change their `expanded` state.

**Expected behavior:**
One example could be lazy loading of menu subitems. When I click to expand a menu item, I need to go and fetch the subitems and then update the menu with the full picture and then I actually want the expand action to take place.

**Steps to reproduce:**
1. create `nb-menu` component with items that have subitems
2. set `expanded` on such an item to `false`.
3. click on the item
4. item expands itself but I wish we are able to control when this item actually expands

**Angular, Nebular**
```
"@angular/core": "~8.2.14",
"@nebular/theme": "4.6.0"
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.