feat(menu): Add delay before closing nested menu after mouse leave
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### Feature Description
**Problem**
When navigating through nested menu items, we must follow a tight path, otherwise it'll close the nested menu.
**Proposed Solution**
In the current behavior, after the mouse leave, the menu is closed.
If we add some delay, before closing the nested menu after the mouse leave event, we could leverage from better navigation.
**Sugestion**
Add an option (matMenuNestedCloseDelay) to change the behavior of closing the nested menu.
When this option is used, it should wait X miliseconds (similar to matTooltipShowDelay) before closing the nested menu after mouse leave.
Also add this option to [MatMenuDefaultOptions](https://material.angular.io/components/menu/api#MatMenuDefaultOptions) to allow override this behavior with injection token.
```
...
```
### Use Case
If I try to selected the 90 days options, througth the smallest path, it closes the nested menu.

**Desired Behavior**
Taken from [stackoverflow](https://stackoverflow.com/a/50953452) with similar issue.

Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par retracer le comportement de fermeture des mat-menu imbriqués lorsque la souris les quitte et comparez le délai demandé à matTooltipShowDelay. Définissez comment matMenuNestedCloseDelay doit être exposé sur mat-menu et MatMenuDefaultOptions, puis vérifiez le comportement de fermeture différée et la surcharge de injection-token avec les tests existants du menu.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100